W3 Mind Logo
Home » is_page() – WordPress

is_page() – WordPress

Display any specific elements on a page, just define page ID in the below code on which page you want to show the element. 

				
					<?php 
if (is_page(123) )
{
?>

" --- Type your conditional content here --- "

<?php
} 
?>
				
			

Or if you want to include the same elements on other pages too, then use the following.

				
					<?php 
if (is_page(123) && !is_page(124) && !is_page(125) )
{
?>

" --- Type your conditional content here --- "

<?php
} 
?>
				
			
About Author
W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
Leave a Reply

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

How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!