• Resolved jbdev

    (@jbdev)


    I am currently using the following to display a category on my static home page

    <?php if( is_front_page() ) { ?>
    <div class="coverboxes">
    <ul class="latest-news">
    <?php
     global $post;
     $myposts = get_posts('numberposts=2');
     foreach($myposts as $post) :
     ?>
        <li><span class="post-info"><?php the_title(); ?><!--<?php the_content(); ?>--><br/></span><a href="<?php the_permalink(); ?>"></a></li>
     <?php endforeach; ?>
    </ul>
    </div>
    <?php } ?>

    I would like to chow the content of each post as well however when I add in the following it shows the homepage content not the category content

    <?php the_content(); ?>

    any ideas?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘One category on homepage’ is closed to new replies.