Forums

[resolved] Change buttons on header based on page viewed (2 posts)

  1. matt_t
    Member
    Posted 2 years ago #

    Hello

    I am a designer who is new to wordpress/coding.

    I have a header with a Title and 3 buttons linking to pages:
    -----
    TITLE
    NEWS | BIO | WORK
    -----

    I would like my header buttons to change depending on which page is being viewed:
    -----
    TITLE
    NEWS | BIO | WORK
    -----
    then...
    if you click on NEWS the header should look like this:
    -----
    TITLE
    RECENT NEWS | PRESS
    -----

    I'm pretty sure I need an if statement that says if is_page('news') then hide the previous buttons and show the 2 new buttons.

    I could be way off here so any help or direction would be much appreciated.
    Thanks :)

  2. matt_t
    Member
    Posted 2 years ago #

    After many hours I've figured it out using wp_list_pages('exclude=(insert page id)&title_li=')

Topic Closed

This topic has been closed to new replies.

About this Topic