Forums

Remove blog link from navigation (7 posts)

  1. Hampstead
    Member
    Posted 2 years ago #

    I'm using a theme which has a link to the blog in the navigation. How do I remove it?

    <ul id="nav">
            	<ul>
    				<li<?php if (is_home()){ echo " class=\"current_page_item\"";}?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
                    <?php wp_list_categories('orderby=name&order=DESC&show_count=0&title_li=&exclude='.$featuredcategory.$comma.$singlefamcategory.$comma.$multifamcategory.$comma.$condocategory.$comma.$mfgcategory); ?>
    				<?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    			</ul>
            </ul>
  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    you want to remove a link to 'Blog'? Or to 'Home'?

    Removing this:
    <a href="<?php bloginfo('url'); ?>">Home</a>
    would get rid of the home link. If its to something called 'blog' thats not in the code, so it would be a page you made or soemthing, which could be excluded....but I wanna verify what you are asking first!

  3. Hampstead
    Member
    Posted 2 years ago #

    Keep the homepage link, but there is a link to the blog category. If I remove the blog category, the theme breaks.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    so blog is a category? Looks like you'd need to exclude it then in the long complicated wp_list_categories line

    http://codex.wordpress.org/Good_Navigation_Links#Categories

    your exclude list in there is already pretty complicated, not sure the best way to add the blog category tho.....

  5. Hampstead
    Member
    Posted 2 years ago #

    Yes it's a category. I want to exclude all categories except one.

    I'll keep digging.

  6. Hampstead
    Member
    Posted 2 years ago #

    Going to try this.

  7. Hampstead
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.