Hi Xaliber
Thanks for the reply.
I′m not 100% sure where to put that tag. In functions.php this is the code for the blog widget.
// **** PRODUCTION - BLOG LIST START ****
class prod_blog extends WP_Widget {
function prod_blog() {
parent::WP_Widget(false, 'Architekt - Blog');
}
function widget($args, $instance) {
$args['blog_title'] = $instance['blog_title'];
prod_func_blog($args);
}
function update($new_instance, $old_instance) {
return $new_instance;
}
function form($instance) {
$blog_title = esc_attr($instance['blog_title']);
?>
<p><label for="<?php echo $this->get_field_id('blog_title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('blog_title'); ?>" name="<?php echo $this->get_field_name('blog_title'); ?>" type="text" value="<?php echo $blog_title; ?>" /></label></p>
<?php
}
}
function prod_func_blog($args = array(), $displayComments = TRUE, $interval = '') {
global $wpdb;
//echo $args['before_widget'] . $args['before_title'] . $args['title'] . $args['after_title'];
echo $args['before_widget'] . $args['before_title'] . $args['blog_title'] . $args['after_title'];
$port_args = array(
'category_name' => 'blog',
'post_type' => 'post',
'posts_per_page' => 5
//'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
);
query_posts($port_args);
echo '
<ul>';
while (have_posts()) : the_post(); ?>
<li><a>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
<?php
echo '</ul>
';
echo $args['after_widget'];
wp_reset_query();
}
register_widget('prod_blog');
// **** PRODUCTION - BLOG LIST END ****
[Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]