Create an if statement based on page_id

I’m creating custom content and I want to show different content based on my page ID.

For example, in home page I don’t want to show anything but in another page I want to fill that space with some text and in other different page I want to fill the same space but with different text.

In my page.php is where I want to put this “IF” statement as follow:

IF (is_home) {display nothing }
ELSE IF (is_page_id=1111) {display text01} 
ELSE IF (is_page_id=2222) {display text02}

How can I control this using php?

Read more here: Create an if statement based on page_id

Leave a Reply

Your email address will not be published. Required fields are marked *