Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15367

    I’m using Category menu items to display content from 2 posts categories on their own respective pages. I had to do this because I wanted to create 2 blogs. The problem is when I click on a post on either category page, the top level menu is no longer highlighted.

    Here is a category page: http://www.boggscollective.com/boggs_version2/category/chairmakers_journal/

    If you click a post you will see that Chairmaker’s Journal in the menu is no longer highlighted.

    Is this something that can be resolved?

    Also, I would like the category title to be on the top of individual posts.

    Thanks.

    #87213

    Can someone please help with this?

    The site has been pushed live, so the link is now: http://www.boggscollective.com/category/chairmakers_journal/

    Thanks.

    #87214

    Hi balero98,

    I just want to clarify, when you say menu highlighting, do you mean, that you want it to be a link? when clicked, it goes directly to the specific category page?

    Regards,

    Ismael

    #87215

    Thanks for the response. No, I mean I want the main navigation item to still reflect that you are within that section. Currently, if you go to either blog, Chairmaker’s Journal or News & Newsletters and click on a post title, the respective menu item will no longer be a different color. Because of this, as a visitor, you have no idea where you are on the Website. I would like the main menu item, “Chairmaker’s Journal” or “News & Newsletters” to still be a different color when you click on a post on those blogs. I would also like the blog title to be at the top of the post page so you have even more of an idea where you are with in the Website. Make sense? Currently, it’s not intuitive.

    #87216

    Hi!

    Try following css code in css/custom.css:

    #top .main_menu .menu .current-post-ancestor a strong, #top .main_menu .menu .current-menu-parent a strong {
    color: #734E05;
    }

    Best regards,

    Peter

    #87217

    Beautiful! Thanks! Any way to have the category title at the top of posts?

    #87218

    Hi,

    Glad Peter could help you.

    Open includes > loop-index.php find this code.

    <a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link:','avia_framework')?> <?php the_title(); ?>"><?php the_title(); ?></a>

    Replace it with this

    <?php if ( !is_category( ) ) { ?>
    <a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link:','avia_framework')?> <?php the_title(); ?>"><?php the_title(); ?></a>
    <?php } else { ?>
    <a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link:','avia_framework')?> <?php the_title(); ?>"><?php the_title(); ?></a>
    <?php $cats = get_the_category();

    if(!empty($cats))
    {
    echo '<span class="title-cat">';
    the_category(', ');
    echo '</span>';
    }
    } ?>

    Now, you have to style span.title-cat on your custom.css

    Regards,

    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Menu highlighing for posts’ is closed to new replies.