Forums

Category as Nav Button (8 posts)

  1. pardoner
    Member
    Posted 3 years ago #

    Is there a way to make a Category a Navigation button?

    like this:
    HOME | ABOUT | CATEGORY 1

  2. cyke0
    Member
    Posted 3 years ago #

    I would like to know how too..

  3. MichaelH
    Volunteer
    Posted 3 years ago #

    Could hardcode the Category archive link in the template that houses your navigation.

    Resources:
    Stepping Into Templates
    Template Hierarchy

  4. viceng
    Member
    Posted 3 years ago #

    just create a page called "category 1"

    use a plugin called page links to to set the page to the category url.

    you should be all set

  5. MichaelH
    Volunteer
    Posted 3 years ago #

  6. kimmeehh
    Member
    Posted 3 years ago #

    It's a great mod!
    but...

    the class of the menuitem that represents the categoy will not change to 'active' or 'current-page-item'. My visitor cannot see wha page he is on.

    Any thoughts on how to solve that?

    Thanks

  7. kimmeehh
    Member
    Posted 3 years ago #

    if (get_option('show_on_front') != 'page') {
                        $class = '';
                        if (is_home() || is_archive() || is_single() || is_paged() || is_search()) {
                            $class = 'current_page_item';
                        }
                ?>
                    <li class="<?php echo $class; ?>"><a href="<?php echo get_option('home'); ?>">Home</a></li>
                    <?php } ?>
                    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

    May be the cause of eh above problem? I don't understand it.

  8. discipolo
    Member
    Posted 2 years ago #

    its a great plugin because i dont have to edit header.php (or any other) so if i change themes the navigation stays there (as long as i add appropriate css to the new theme)

    also i dont have du uncomment the standard list_pages navi

    but as kimmeehh pointed out the current_item highlight isnt working.

    if anyone finds a fix please share!

Topic Closed

This topic has been closed to new replies.

About this Topic