• For the past week, I have been trying to figure out how to make my website’s navigation into a dynamic menu. However, it has been a complete frustration for me. For one, I lack CSS/PHP knowledge and two, I am trying to understand the logic of PHP. I took a VB.NET course not too long ago, it gave me some hints with the if… else… statements that it wasn’t enough to make me understand some principles of PHP.

    Here is the article that I read on WP.org: http://codex.wordpress.org/Dynamic_Menu_Highlighting

    I am a little frustrated, I am hoping that someone can assist me.

    First of all, when one menu is inactive, it has the following tags (class=”home” and id=”home”). If active it goes (class=”homea” and id=”homea”). I don’t know how to make it into PHP.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter fubarness

    (@fubarness)

    Oh yes, I forgot to link my websites to see what the issue is.

    Normal: http://gantdesigns.com
    WP Issue: http://gantdesigns.com/wordpress

    You might want to hit http://themes.wordpress.net/, search for wp-andreas01-12, and look over the code for the dynamic highlighting in that theme.

    Thread Starter fubarness

    (@fubarness)

    I checked the source code of the template.

    But I am still quite confused. All it states in PHP is ‘fetching’ the PHP include. But I don’t how to customize it or re-organize it.

    Anyone?

    Thanks.

    i have the same problem, the only difference is, i just need to change the id when it is selected. for example, a tab that is unselected would have id=”home”. when it is selected, id=”homeslected” would be displayed. i don’t know how to write php scripts, but i think it has something to do with elseif bla bla bla. just a guess! lol

    <?php
    if (is_home())
    {
    echo " id=\"current\"";
    }
    else if {idontknow}?>

    i hope someone could help. thanks a lot.

    I did not have any luck with the codex procedure but I did have some luck with the below website after reading all the way down to the end of the comments. The only problem I’m having now is that my “Posts Page” (WP 2.2.1) link (I called it “News”) will not highlight using the “is_page” call when I’m on my “News” page.

    Dynamic Link process that worked for me (read to the end):
    http://green-beast.com/blog/?p=157

    My website:
    stpaulsms.org

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dynamic Menu Highlighting’ is closed to new replies.