The issue concerns spacing of longer entries in any section in the sidebars such as lists under “Categories” or “Recent Posts,” or really for any text in the sidebars even without being in a block like “Categories.” (The spacing in this post is not necessarily exact but only relative examples to show a general point.)
First entry in a list
Presently a second
entry looks like this
Third entry
How do I make it to look like this?:
First entry in a list
This is closer to
how the second entry
should look.
Third entry
if in category a or in category b,
show a list of category a with “category a” on top, and the show a list of category b with “category b” on top.
the wording for “category a” and “category b” will be styled differently.
I’ve tried many variations, this one almost worked but keeps showing the same post content for every different post.
<?php if (in_category('5') || in_category ('6')) : ?>
<ul class="lineabove title notopmargin">
<li>Markit News</li></ul>
<?php $my_query = new WP_Query('cat=5&showposts=15'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<ul><li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li></ul>
<?php endwhile; ?>
<?php endif; ?>
<?php if (in_category('6')) : ?>
<ul class="lineabove title notopmargin">
<li>Client News</li></ul>
<?php $my_query = new WP_Query('cat=6&showposts=15'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<ul><li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li></ul>
<?php endwhile; ?>
<?php endif; ?>
Even having just one of these loops messes it up.
]]><div id=”sidebar”>
<?php if ( !function_exists(‘dynamic_sidebar’)
|| !dynamic_sidebar() ) : ?>
and therefore do not have a dynamic sidebar file to edit the look of it. How would i be able to put this tiny bit of css code:
list-style-type: none;
into the correct css file to make the default list icon as a round disc to nothing at all?
Such a simple thing, but so difficult to achieve!
Thanks for your help
]]>Problem is I don’t want to have to manually update these lists for each seperate category.php. Is there a plugin that would solve this?
thank you