WordPress.org

Ready to get started?Download WordPress

Forums

Custom Header for .php in seperate folder (3 posts)

  1. greatbig47
    Member
    Posted 8 years ago #

    I've got some "static" pages in seperate folders, but I need the ACTIVE state of the buttons when the user is on that page...

    Here's the site:
    http://shelbyparkmanor.misight.com/
    (On this page, HOME will need an active state. I can do that, no problemo!)

    Buy then I got these kinda of pages:
    http://shelbyparkmanor.misight.com/apartments/ and...
    http://shelbyparkmanor.misight.com/directions/

    How can I make the active state work for these pages?

    Is the some kind of .php voodoo I can use?

    Like:

    if page=apartment/index.php than header=apartmentheader.php
    if page=directions/index.php than header=directionsheader.php
    ifelse=header.php

    Thanks!!

  2. moshu
    Member
    Posted 8 years ago #

    This should get you started: Dynamic_Menu_Highlighting

  3. greatbig47
    Member
    Posted 8 years ago #

    Oh...I've done that before...and it works GREAT!

    It's when I get here, I'm not sure what to do (since the pages are root/apartments/index.php)...

    <?php
    if ( is_page('Page One') ) { $current = 'one'; }
    elseif ( is_page('Page Two') ) { $current = 'two'; }
    elseif ( is_page('Page Three') ) { $current = 'three'; }
    elseif ( is_page('Page Four') ) { $current = 'four'; }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.