Add Category links on Navigation Bar

Home Forums How To Add Category links on Navigation Bar

This topic contains 0 replies, has 1 voice, and was last updated by  Growin 1 year, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1372

    Growin
    Participant

    Add category links on the main navigation bar by adding a few lines of code.
    This will make category links easier for your users to find instead of always using the navigation dropdown.
    This works for the affiliate platform and may work for other themes.

    Before adding to the navigation bar make sure you already have created categories for your site.
    Like normal – create categories in admin panel and find the web address of those categories through the navigation dropdown.

    Then go to cat.php and listing.php in cpanel and add these lines in bold. Then add the first two lines and add in the end of the address not including your domain name and what you want the category links name.

    Add as many categories as you want by using the first two

  • lines
    
    <div class="container container-pull" id="display-posts">
    <div class="list-nav">
    <ul>
    <li><a href="category-link1.html"><h3>type category name1</h3></a></li>
    <li><a href="category-link2.html"><h3>type category name2</h3></a></li>
    <li><a href="cat-<?php echo $cid;?>-<?php echo $CategoryUrl;?>-newest.html" <?php if ($sort==""){ echo "class=active"; }else if ($sort=="none"){ echo "class=active"; }else if ($sort=="newest"){ echo "class=active"; }?>><h4>Newest</h4></a></li>
    <li><a href="cat-<?php echo $cid;?>-<?php echo $CategoryUrl;?>-low.html" <?php if ($sort=="low"){ echo "class=active"; }?>><h4>Lowest</h4></a></li>
    <li><a href="cat-<?php echo $cid;?>-<?php echo $CategoryUrl;?>-high.html" <?php if ($sort=="high"){ echo "class=active"; }?>><h4>Highest</h4></a></li>
    </ul>
    </div>
    
    • This topic was modified 1 year, 1 month ago by  Growin.
    • This topic was modified 1 year, 1 month ago by  Growin.
    • This topic was modified 1 year, 1 month ago by  Growin.
    • This topic was modified 1 year, 1 month ago by  Growin.
    • This topic was modified 1 year, 1 month ago by max max.
    • This topic was modified 1 year, 1 month ago by  Growin.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.