SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wordpress: tags as box titles

    Hi,

    have a look at my site at the 4 boxes (screenshot below)


    I need the article tags to show as the box titles (titles are the one in white with red background)

    Below the code, can u help me to fix it please?

    Code:
    <div style="float:left; width:605px; overflow:hidden; margin-left:5px; display:inline;">
    
    <div class="minipost">
    <div class="fp-post_head">
    <h4><?php
    	$minicat1 = get_option('remedy_mini_category1'); 
    	$my_query = new WP_Query('category_name= '. $minicat1 .'&showposts=1');if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_category(',','single'); ?>
    
    <?php
    endwhile;
    }
    ?> </h4>
    
    
    </div>
    <?php 
    	$minicat1 = get_option('remedy_mini_category1'); 
    	$my_query = new WP_Query('category_name= '. $minicat1 .'&showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
    ?>
    
    <div class="hentry">
    <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <div style="width:290px; height:133px; display:inline; text-align:center; margin-left: 4px; overflow: hidden; float: left;">
    <img src="<? echo strtolower($homethumb); ?>" width="290" height="133" alt=""  />
    </div>
    <span style="font-weight:800; width:210px; float:left; overflow:hidden;">
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title('&nbsp;&nbsp;'); ?></a></span>
    <span class="minipostdate"><?php the_time('m-d-y'); ?></span>
    <div class="clear"></div>
    <?php the_excerpt(); ?>
    </div>
    <div class="meta"> 	
    	<div class="postmore"> <a href="<?php the_permalink() ?>">Read More</a></div>
    </div>
    <?php endwhile; ?>
    </div>
    
    
    
    
    
    
    
    
    
    
    
    <div class="minipost" style="border-right:1px solid #0977b2">
    
    <div class="fp-post_head">
    <h4>
    <?php
    	$minicat1 = get_option('remedy_mini_category2'); 
    	$my_query = new WP_Query('category_name= '. $minicat1 .'&showposts=1');if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_category(',','single'); ?>
    
    <?php
    endwhile;
    }
    ?></h4>
    </div>
    
    <?php 
    	$minicat2 = get_option('remedy_mini_category2'); 
    	$my_query = new WP_Query('category_name= '. $minicat2 .'&showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
    ?>
    
    <div class="hentry">
    <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <div style="width:290px; height:133px; display:inline; text-align:center; margin-left: 4px; overflow: hidden; float: left;">
    <img src="<? echo strtolower($homethumb); ?>" width="290" height="133" alt=""  />
    </div> <span style="font-weight:800; width:210px; float:left; overflow:hidden;">
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title('&nbsp;&nbsp;'); ?></a></span>
    <span class="minipostdate"><?php the_time('m-d-y'); ?></span>
    <div class="clear"></div>
    <?php the_excerpt(); ?>
    </div>
    <div class="meta"> 	
    	<div class="postmore"> <a href="<?php the_permalink() ?>">Read More</a></div>
    </div>
    <?php endwhile; ?>
    </div>
    
    
    
    
    
    
    
    <div class="minipost" style="border-bottom:1px solid #0977b2; overflow:hidden">
    
    <div class="fp-post_head">
    <h4><?php
    	$minicat3 = get_option('remedy_mini_category3'); 
    	$my_query = new WP_Query('category_name= '. $minicat3 .'&showposts=1');if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_category(',','single'); ?>
    
    <?php
    endwhile;
    }
    ?></h4>
    </div>
    
    <?php 
    	$minicat3 = get_option('remedy_mini_category3'); 
    	$my_query = new WP_Query('category_name= '. $minicat3 .'&showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
    ?>
    
    <div class="hentry">
    <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <div style="width:290px; height:133px; display:inline; text-align:center; margin-left: 4px; overflow: hidden; float: left;">
    <img src="<? echo strtolower($homethumb); ?>" width="290" height="133" alt=""  />
    </div><span style="font-weight:800; width:210px; float:left; overflow:hidden;">
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title('&nbsp;&nbsp;'); ?></a></span>
    <span class="minipostdate"><?php the_time('m-d-y'); ?></span>
    
    <div class="clear"></div>
    <?php the_excerpt(); ?>
    </div>
    <div class="meta"> 	
    	<div class="postmore"> <a href="<?php the_permalink() ?>">Read More</a></div>
    </div>
    <?php endwhile; ?>
    </div>
    
    
    
    
    
    
    
    
    
    <div class="minipost" style="border-right:1px solid #0977b2; border-bottom:1px solid #0977b2">
    
    <div class="fp-post_head">
    <h4><?php
    	$minicat1 = get_option('remedy_mini_category4'); 
    	$my_query = new WP_Query('category_name= '. $minicat1 .'&showposts=1');if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_category(',','single'); ?>
    <?php
    endwhile;
    }
    ?></h4>
    </div>
    
    <?php 
    	$minicat4 = get_option('remedy_mini_category4'); 
    	$my_query = new WP_Query('category_name= '. $minicat4 .'&showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
    ?>
    
    <div class="hentry">
    <?php $homethumb = get_post_meta($post->ID,'homethumb', true); ?>
    <div style="width:290px; height:133px; display:inline; text-align:center; margin-left: 4px; overflow: hidden; float: left;">
    <img src="<? echo strtolower($homethumb); ?>" width="290" height="133" alt=""  />
    </div>
    
    <span style="font-weight:800; width:210px; float:left; overflow:hidden;">
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title('&nbsp;&nbsp;'); ?></a></span>
    <span class="minipostdate"><?php the_time('m-d-y'); ?></span>
    <div class="clear"></div>
    
    <?php the_excerpt(); ?>
    </div>
    <div class="meta"> 	
    	<div class="postmore"> <a href="<?php the_permalink() ?>">Read More</a></div>
    </div>
    <?php endwhile; ?>
    </div>
    
    </div>

  2. #2
    SitePoint Evangelist zeruel's Avatar
    Join Date
    Feb 2008
    Location
    SouthEast
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can the article tags be a title? I think it will look spammy if you do that.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •