Help with recent posts widget
-
Hi i need some help altering this code so that a category (ID: 9) is not shown in the recent posts list.
———————————————————
function widget_recent_entries($args) {
extract($args);
$title = __(‘Nieuws’, ‘widgets’);
$r = new WP_Query(‘showposts=10’);
if ($r->have_posts()) :
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?><div style=”background-image: url(https://www.toytastic.nl/wp-content/themes/toytastic/img/devider_line.gif); background-repeat: repeat-x; width: 175px; height: 2px;” align=”center”></div>-
<?php while ($r->have_posts()) : $r->the_post(); ?>
- “><?php if ( get_the_title() ) the_title(); else the_ID(); ?>
<?php endwhile; ?>
<?php echo $after_widget; ?>
<?php
endif;
}
———————————————————
Thank you ??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Help with recent posts widget’ is closed to new replies.