WordPress.org

Forums

remove archive & category links from the front page? (2 posts)

  1. yogaboat
    Member
    Posted 10 years ago #

    How can I make the 'archive' and 'category' links only show up on the blog page, and not my home page.

    NOTE: my home page is not the blog page, but a static page.

    Plug something like this in:

    <?php /* If this is the frontpage if ( is_home() || is_page() ) */{ ?>

    prior to these lines?:

    <li><h2><?php _e('archives (private)'); ?></h2>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>
    </li>

    <li><h2><?php _e('categories (private)'); ?></h2>
    <ul>
    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
    </ul>
    </li>

    How can I code it so that it says if this is the home page, DON'T display those links? Or I guess have it say, if this is the blog page DO display those lnks? Specify Page_ID?

  2. yogaboat
    Member
    Posted 10 years ago #

    Actually, now that I think about it, the blog page is the only page I want the sidebar to have archive and category links. So I guess the question is how to code this piece so it checks to see if it's on the blog page (page ID 8 in this case), and if it's not, don't display those links?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.