Category loop in index php with categories widget
(I wish a few existing topics were open, so that I might build upon their discussions…)
My site is so simple that its template+theme may be described in one simple index.php, with one simple functions.php to register a sidebar. In the sidebar, I have a category-select drop-down. It works fine for one select. However, after the first time through, the nav links simply point to the next post before and the next post after the targeted page: the selected category is not retained even though I have inspected “is_category” to describe “previous_post_link” and “next_post_link”.
How may I maintain a category loop in my simple index.php (including, for at least cosmetic value, leaving the relevant category “selected” in the categories widget)?
Does this entail an outer loop, or an extra wp_query after the widget?
Or is it *absolutely necessary* that I copy and maintain a separate category.php identical to index.php? (Which would seem a little wasteful and inefficient.)
- The topic ‘Category loop in index php with categories widget’ is closed to new replies.