Forums

passing a page id into an if statement? (1 post)

  1. myfishtanknet
    Member
    Posted 4 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic