• Hello i have a custom widget and i have placed my own code in it to display articles from a specific category but it doesn’t work.

    Here is my code

    <div class="latestNews">
    
    <?php query_posts('cat=529&showposts=2'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <div class="postContent" > 
    
    <h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <?php echo get_the_excerpt(); ?>
    
    </div>
    
    <?php endwhile; endif; ?>
    
    </div>

    Any help will be appreciated.

    Regards

    Nicos

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom widget to display specific article category’ is closed to new replies.