Navigation: Category Selection
After searching the support section and Codex files for neigh on two weeks, Iâ€™ve finally succumbed to penning my questions here.
Itâ€™s got to the point that Iâ€™m beyond frustrated; Iâ€™m almost ready to give up on WP and go back to using Frontpage, but if I do that I miss out on so much, which naturally I donâ€™t want to do. So hereâ€™s my problem…
I used the CSS I designed in Frontpage 2003, modified some of the coding to support WordPress & php and Iâ€™m eager to get it on my site. However the horizontal menu doesnâ€™t function properly (or even at all) because it has no destination links – at least I DON’T believe that it does, is probably more appropriate.
Iâ€™ve made the horizontal menu my primary navigation for the site so itâ€™s important that I understand how WP & php works. In Frontpage, if I wanted a primary navigation link to go somewhere, I just hand coded the destination page link into the navigational structure and it would work. But here? Iâ€™m confused. My existing HTML in header.php
After reading Codex, Iâ€™ve inserted
<?php echo get_settings(â€˜homeâ€™); ?>for the home tab, and it works, but for the others I havenâ€™t been able to find any information that will advise me on how to insert an individual category so that when I click on â€œarticlesâ€? or “topics” or Submissions” in the primary navigation, the page will reload and display all associated category posts exclusively for that category and nothing else.
(I hope you understand my explanation).
I need to point out here that I donâ€™t believe using the exclusion function in the category php code is the right way to go about this simply because as my site grows I will have to manually add the new categories that reside in my sidebar to the exclusion function code and that seems rather ridiculous to me.
Is there a specific is_function or get_function or some other function that I can insert between the navigational tags that will call only the category: Articles or Topics or Submissions, etc, etc whenever anyone clicks the primary navigation? At the moment Iâ€™m flying by the seat of my pants; Iâ€™ve inserted:
and that seems to work now, although yesterday it didn’t work correctly. While the page reloaded under, I assume, articles, ALL POSTS displayed in the articles section even though I nominated specific category sections for each individual post. Silly, huh?
Anyway, it seems to work now. I tested the primary navigation today and now only relevant posts are showing under the selected category within the main navigational bar. So my question is: is this right? Have I inserted the right code within the tags? Is this standard practice for anyone designing a horizontal navigational menu?
Any help would be greatly appreciated. Thanks heaps.
PS: I have two other questions which I have submitted under different topics, so hopefully someone will take pity on me and reply 🙂
- The topic ‘Navigation: Category Selection’ is closed to new replies.