[NOOB] Build Navigation based on the posts and its categories and also the pages (4 posts)

  1. elitestyles
    Posted 6 years ago #


    It's my first time desiging and building a wordpress blog from scratch. I am very confident in xhtml/css but not PHP.

    Basically I have built and coded a naviagtion but it is not dynamic in the sense that when you add a page in the admin will it fill up, I have created my navigation using an image and calling the css when the page is current to when the tab will show up accordingly.

    The blog I am creating in the navigation consists of

    -Home (index.php)
    -Music (Should highlight if posts contain the music category)
    -Fashion (Should highlight if posts contain the fashion category)
    -Culture (Should highlight if posts contain the culture category)
    -About Us (Should highlight if page is aboutus)
    -Advertise (Should highlight if page is advertise)
    -Contact (Should highlight if page is contact)

    I have three tabs in my naviagtion (music, fashion and culture) which should only highlight when the post which is on the page currently based on its category which is the same name.

    Now i have no idea how to write this function to handle this request as i am a front end designer and coder.

    Here is my code for my naviagtion

    <ul id="navigation">
    		<li id="home"><a href="#" title="Home | News" class="current"><span>Home | News</span></a></li>
    		<li id="music"><a href="#" title="Music"><span>Music</span></a></li>
    		<li id="fashion"><a href="#" title="Fashion"><span>Fashion</span></a></li>
    		<li id="culture"><a href="#" title="Culture"><span>Culture</span></a></li>
    		<li id="aboutus"><a href="#" title="About Us"><span>About Us</span></a></li>
    		<li id="advertise"><a href="#" title="Advertise"><span>Advertise</span></a></li>
    		<li id="contact"><a href="#" title="Contact"><span>Contact</span></a></li>

    As you can see i have a peice of css with the class current which enables the tab in the navigation to be switched on.

    So is there anyone who could help or point me in the right direction on how to exactly code this up so the navigation will act correctly.

    Many Thanks

  2. q8-gate.com
    Posted 6 years ago #


  3. elitestyles
    Posted 6 years ago #

    Thanks for what it's a question not a solution. Can anyone help?

  4. dremeda
    Sucuri Wizard
    Posted 6 years ago #


    not sure your question makes sense.

    Have you checked out: http://wordpress.org/extend/plugins/multi-level-navigation-plugin/

    This plugin is solid for navigations and straight forward to style.

Topic Closed

This topic has been closed to new replies.

About this Topic