• here’s what i need to do: display certain text based on what page is shown.

    so what i did before was your typical if/elseif statement….

    if (is_page(‘1’))
    and then text would go here
    elseif (is_page(‘2’))
    then this other text goes here

    is there a way instead of having like a dozen elseif statements to maybe just have the page id get plugged into automatically?

    that way i can have one set of code and not a dozen elseif statements?

    Thanks!

  • The topic ‘passing a page id into an if statement?’ is closed to new replies.