Link to home
Start Free TrialLog in
Avatar of jasotasticon
jasotasticon

asked on

Wordpress - highlight "post page" menu item with static home

Here is my exact problem:

http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/

There are a bunch of solutions here, but they all require messing with core files...

Can anyone think of clean way to do this?
ASKER CERTIFIED SOLUTION
Avatar of AndyBeard
AndyBeard
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jasotasticon
jasotasticon

ASKER

AndyBeard,

Sorry, I meant theme not core... I can go in and edit it there I guess. Just so frustrating having to make all these little edits to theme for things that ideally would, "Just work."

thanks though,
- J
This is the benefit of using child themes and functions.php

As an example I am using Thematic on a new site

I have a standard drop down menu in the header, and another one in the footer, but I also wanted different menu items for visitors and members.

This is the code I used for the new menu for visitors

/// Top Page Navigation

//  Add a dynamic menu using wp_list_pages
 
function childtheme_menu() { ?>
     <div class="menu">
          <ul class="sf-menu">
                <?php wp_list_pages('include=2,15&sort_column=post_date&title_li='); ?>
          </ul>
     </div>
<?php }
 
add_action('wp_page_menu','childtheme_menu');


This is the code for the items in the footer

// Footer section for terms of service etc

function footer_pages() { ?>
     <div id="footer-page" class="footer-page-div">
            <div id="list-block">
          <ul class="footer-pages">
                <?php wp_list_pages('include=13,12,14,81,102&sort_column=post_date&title_li='); ?>
          </ul>
            </div>
     </div>
<?php }
 
add_action('thematic_belowfooter','footer_pages');


What I still have to do is use is_use_logged_in() for another menu for logged in users

The new menu system in 3.0 will work better, but there will still be a need to drop down to functions.php or use a plugin for some things, it is just how things are.
I am not much of a programmer, but I know how to search with Google and use code snippets.
Ah, this is very interesting! I had not heard of this method before (I am not a programmer either, I just get paid to do it ; )

Thanks for the info! I will give it a try.

- J