WordPress.org

Ready to get started?Download WordPress

Forums

Display something in a certain manner on index page only (7 posts)

  1. airdrawndagger
    Member
    Posted 7 years ago #

    http://ceciliabjerling.com/wordpress/

    I'm using the blix theme to display my categories as you would pages. Now I've added a link to the start page, but it won't highlight like the categories do. Help? :)

  2. Funkphenomenon
    Member
    Posted 7 years ago #

    I think you need to add class="current-cat" to the list-item you want to highlight.

  3. themystical
    Member
    Posted 7 years ago #

    If the link you added is something like this it wont work,

    <li><a href="http://ceciliabjerling.com/wordpress">Start</a></li>

    instead you should use something like this:

    <li<?php if (is_home()) echo " class=\"current-cat\""; ?>><a href="<?php bloginfo('url'); ?>">Start</a></li>

    but that could be a bit different, dipends on the code you have in your header.php
    basically the if statment is gonna add a class="current-cat" to the home link when the home page is displayed, this class is defined in the css and is gonna higlight the current selection.

  4. airdrawndagger
    Member
    Posted 7 years ago #

    Aah, don't you love it when you just copy+paste and voila! Thank you so much for the help :)

  5. themystical
    Member
    Posted 7 years ago #

    You're welcome :-)

  6. airdrawndagger
    Member
    Posted 7 years ago #

    Ok, so now I added bbpress. My site is relocated to http://www.doublepeace.se , the forum is at http://www.doublepeace.se/forum

    As you might have guessed I would like it to highlight a tab named forum while browsing bbpress. I'm using the wordpress headers as suggested throughout the bbpress support forums. Any help! As of right now it's highlighting my START tab. Thank you!

  7. airdrawndagger
    Member
    Posted 7 years ago #

    Is this difficult? Nobody knows how to do it? It would seem to me it would be similar to what I did above, but with something to identify it as a forum page? Please!

    Check it out at http://www.doublepeace.se , click forum, you'll see what I'm trying to do. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.