How to Add Content In Homepage Only, Page 2 Only, Specific Category, And Specific Tag

Adding content in homepage only

<?php if(is_home() && !is_paged() ) { ?>
-- YOUR CONTENT HERE --
<?php } ?>

Adding content in page/2 only

<?php 
// get current page we are on. If not set we can assume we are on page 1.
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
// are we on page two?
if(2 == $paged) {
 ?>
-- YOUR CONTENT HERE --
<?php } ?>

Adding content in tag ‘health’ only

<?php if ( is_tag('health') ) { ?>
-- YOUR CONTENT HERE --
<?php } ?>

Adding content in category ‘movie review’ only

<?php if ( is_category('movie-review') ) { ?>
-- YOUR CONTENT HERE --
<?php } ?>

 

In case you’re interested in knowing more info on makeup training nyc, stop by http://www.ninamua.com

Visit http://www.edgesigns.com to find out more regarding retractable awning

Visit marketerium.com to find out more regarding seo san diego

Leave a Reply

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