Plugin Author
Alex
(@alexander_fuchs)
Can you send me a screenshot with the problem?
Hi,
A screenshot can be found at http://s1349.photobucket.com/user/klpdesigns/media/Screen%20Shot%202015-04-12%20at%2015.42.21_zpsupxeytek.png.html
The PHP i am using to list the categories in the sidebar is:
<?php query_posts('category_name=tutorials,step-by-step'); ?>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a> </li>
<?php endwhile; ?>
Plugin Author
Alex
(@alexander_fuchs)
The problem is the querry interfers with your theme. This is not a problem with the plugin.
See this post: https://ww.wp.xz.cn/support/topic/list-post-titles-in-a-certain-category?replies=19
In a list:
<ul><li><h2>Photography</h2>
<ul>
<?php
query_posts('category_name=Photography&showposts=-1'); while(have_posts()) : the_post();
?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink to <?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
</li></ul>
Reference:
http://codex.ww.wp.xz.cn/Template_Tags/query_posts
It’s possible this might cause conflicts with an existing post loop on the page, so this is an alternative:
<ul><li><h2>Photography</h2>
<ul>
<?php
$photog_posts = new WP_Query('category_name=Photography&showposts=-1'); while($photog_posts->have_posts()) : $photog_posts->the_post();
?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink to <?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
</li></ul>
Reference:
http://codex.ww.wp.xz.cn/Function_Reference/WP_Query
And one more option (assumes “Photography” has the category ID 10):
<ul><li><h2>Photography</h2>
<ul>
<?php
$photog_posts = get_posts('category=10&numberposts=-1'); foreach($photog_posts as $post) : setup_postdata($post);
?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink to <?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</li></ul>
Reference:
http://codex.ww.wp.xz.cn/Template_Tags/get_posts
</blockquoute>
Please try the second or third option listed there. You should be able to do what you want to do using their code.