• Hello,
    I’m working on the new site of Makeatuvida/. I’m creating a child theme of Modularity Theme, and I’m trying to modify the Five Category Section of the home page. This categoy section (which is located in five.php) shows the 5 last posts of different categories.

    <!-- Begin Five Category Section -->
    <div id="category-section">
    <?php
    $tag_130 = get_option('T_category_section_1');
    $cat_2 = get_option('T_category_section_2');
    $cat_3 = get_option('T_category_section_3');
    $cat_4 = get_option('T_category_section_4');
    $cat_5 = get_option('T_category_section_5');
    ?>
    <?php $display_categories = array("$tag_130","$cat_2","$cat_3","$cat_4","$cat_5") ; $i = 0;
    	foreach ($display_categories as $category) { $i++; ?>
    <?php query_posts("showposts=1&cat=$category"); ?>
    	<div class="column span-4 post-<?php the_ID(); ?><?php if ($i < 5) { ?> colborder<?php  } ?><?php if ($i == 5 ) { ?> last<?php $i==0; } ?>">
    		<?php while (have_posts()): the_post();?>
                <h3 class="sub"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title() ?></a></h3>
    			<?php postimage('thumbnail'); ?>
    			<p><?php echo substr(get_the_excerpt(),0,150); ?> <a href="<?php the_permalink(); ?>">&nbsp;+&nbsp;</a></p>
    <?php endwhile;?>
    	</div>
    <?php } ?>
    </div>
    <div class="clear"></div>

    I am trying to change one of the posts (the first one) into the last post of a tag (tag=derivas), and also to link its title to tag.php

    Can anyone help me?

  • The topic ‘Modify Five Category Section of Modularity Theme’ is closed to new replies.