WordPress.org

Ready to get started?Download WordPress

Forums

Using WP-static homepage -> No active state blogpage (4 posts)

  1. edusilva
    Member
    Posted 6 years ago #

    I'v set the option within WordPress to use a static homepage, (options->reading), and selected another page for the posts.
    The static homepage works as a charm, but the blog-page doesn't have an active menu-tab when I visit it. I'm using the K2-theme.
    Anyone know of a solution?

  2. Chris_K
    Member
    Posted 6 years ago #

    What's an active menu tab?

  3. edusilva
    Member
    Posted 6 years ago #

    Ow sorry, maybe it's dutch-english :-)
    My mainmenu consists of 'tabs' and when I'm on the homepage, the Tab labelled HOME is white and all the other ones are orange. I can hover over the other menu-items and they'll change color and when I select for example the item 'gallery', the tab labbeled HOME is orange again and Gallery is white.
    Hope this explains it a bit?

  4. haycroftmedia
    Member
    Posted 6 years ago #

    I just this second came up with a solution of sorts to this same problem.

    in your header.php before the menu is printed, use this php function to identify the url of the page you are on: <a href="http://dev.kanngard.net/Permalinks/ID_20050507183447.html" target="_blank">http://dev.kanngard.net/Permalinks/ID_20050507183447.html</a>

    dont include "print(selfURL());" instead, "$url = (selfURL());"

    if (for example) the page with your blog is on has the url "http://www.mysite.com/blog" then

    "<?php if ($url == "http://www.mysite.com/blog"){
    ?>
    (include html for your full menu here with the class of your blog set as active)
    <?php
    } else {
    ...

    If you need more detail reply to this and let me know!

Topic Closed

This topic has been closed to new replies.

About this Topic