Support » Themes and Templates » [Resolved] Question about page links

[Resolved] Question about page links

  • I’m trying to make a few theme adjustments, which indicates what page you’re on by highlighting the relevant link. However, it appears that the front page (the “root” page), isn’t handled like a page you make yourself (it’s not in the list). This means that I have to add a link to the front page myself, which means that it won’t be very dynamic.

    Is there a way to make the front page (“root” page) part of the page list (the list of pages you’ve created), so that I can treat its link as I treat the links to the rest of the pages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello

    If I understand you just want the active (current) pages link to be different than the rest?

    If this is correct, than this might help: http://codex.wordpress.org/Dynamic_Menu_Highlighting

    If you have already read that and are still confused. You can refer to the main page by

    if ( is_home() ) { $current = ‘one’; }
    elseif ( is_page(‘Page Two’) ) { $current = ‘two’; }
    elseif ( is_page(‘Page Three’) ) { $current = ‘three’; }
    elseif ( is_page(‘Page Four’) ) { $current = ‘four’; }

    Hope it helps!

    That’s kind of what I wanted. It does solve this specific problem, but it may not be able to solve future, similar problems. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Question about page links’ is closed to new replies.
Skip to toolbar