ThemeShaper Forums » Thematic

current_page_item on single post

(1 post)
  • Started 10 years ago by alexander.prestmo
  • This topic is not resolved
  1. First of all since I'm new here. Hello everybody, I'm Alex from Norway.I think Thematic is fantastic to work with. I've used it on three sites now and it works great, saves time, and does almost anything I want to. Except for at the moment one thing I'm struggling with.

    I use the sample function included in Thematic for displaying a "home"-link in the menu. Every list when it is active will by default get the class="current_page_item" applied to itself. Which is nice for styling. But have you noticed what happens with the htmlcode for the "home"-link when you view a blogpost? It only displays an empty li tag.

    On the site I'm working on now the "home"-link is named news and nothing is changed in the WordPress backend, so it displays the 5 newest blogposts there. How can my "home"-link still have the class="current_page_item" applied to it even though it really is displaying a single post?

    I've found one solution, but it's no good as it means you have to add a is_single() in the post-template.php on line 824 in the core. It sure works, but will break when I upgrade WordPress the next time. Is it possible to add a if statement in the "home"-link function somehow? This is unfortunatly a little outside of my at the moment php skills.

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.