Current page condition in wordpress


First you need the current page id, Get the current page by following code $post->ID it's return current page id

Condition


<?php 
if($post->ID == '123'){
 print "Some Output";
}
else 
{
 print "Some Output";
}



Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.