I want to style a current state with CSS to indicate the page currently being viewed, but List category posts doesn’t generate a class hook. All it would need is something similar to the solution posted here.
How or where would I modify the plugin or request that the feature to be added?
Thanks.
UPDATE:
I’m using eStore 2.9 with a combination of List-Category-Posts and Dynamic Widgets. They all work as expected, but neither List-Category-Posts nor any similar plugin allows me to list posts in a category AND generate a .current class for me to style with. So I’m left with trying to hack (possibly) the plugin to give me current class hook.
And no it’s not a homebrewed sidebar. I’d rather the >Menu option in the CP worked its magic.
To recap what I want to achieve: the list-category-post plugin generates a list of links for a given category, like so:
<h4>Category Name</h4>
<ul>
<li><a>Apples</a></li>
<li><a>Oranges</a></li>
<li><a>Pears</a></li>
</ul>
I want a .current class attached to either the li or a tag of the currently viewed page in the said list:
<h4>Category Name</h4>
<ul>
<li class="current"><a>Apples</a></li>
<li><a>Oranges</a></li>
<li><a>Pears</a></li>
</ul>
Fernando, the plugin’s developer, has graciously added the feature to a new version of the plugin. I’m impressed and very grateful.
I’m not clear on exactly what you’re trying to style, but if you can edit your theme, you can add classes to the body tag which will indicate which page/post/category is being viewed. Look in the header.php file and make sure the body tag looks like this:
Here’s the full reference:
http://codex.wordpress.org/Function_Reference/body_class#Examples
Best of luck, hope this helps.