WordPress.org

Forums

Page Title Variable (3 posts)

  1. Ecko
    Member
    Posted 7 years ago #

    Just a quick one, I've had a look around but couldn't see anything on it;

    Basically I'm after the page title of the current page. the_title() function gives this, but it prints it. I need to get hold of the title to work with as I wish to compare the page title to an array in order to set additional functions on certain pages. (ie if(in_array($page_title,$title_array)) { some_function(); }

    TIA

  2. MichaelH
    Member
    Posted 7 years ago #

  3. babyboy808
    Member
    Posted 6 years ago #

    Thanks Michael, worked a treat.

Topic Closed

This topic has been closed to new replies.

About this Topic