Query Page by ID
-
Hello, I’m a newbie in worpdress, and I want to know how to display pages content including title, permalinks, excerpt by ID because I have a lot of pages but I only want 3 specific pages content to display on my home page.. plus, I want to make something different, I want to use different for every content displayed.. how to use the if statement inside the loop? like
if page id = 12 then <h2 style=”background-image:url(…..)”><?php the_title();?></h2>
if page id = 14 then <h2 style=”background-image:url(…..)”><?php the_title();?></h2>
else <h2 style=”background-image:url(…..)”><?php the_title();?></h2>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query Page by ID’ is closed to new replies.