Reputation: 1386
I have created a front page (i.e index.php
) with my own design. This page will contain
<?php get_header(); ?>
[has navigation bar code]<?php get_footer(); ?>
[has footer links]The problem is, I see index.php
loaded correctly as a front page. But when I navigate to other pages like About or Contact, the respective content from these pages is not showing up. Instead what getting loaded there is, same what Index page has. I don't want slider or thumbnail appearing on these pages.
So how to tell wp that, this is my front page, and this is my About page, don't load a slider and stuff on About page!?
Upvotes: 0
Views: 293
Reputation: 16
I usually create a front-page.php file, Wordpress will use that instead of index.php (which you can use as a generic template from then on).
Upvotes: 0
Reputation: 499
Make another template and set this template for your single pages. And then from backhand set it.
Upvotes: 1
Reputation: 8282
Try this ,
if( is_home() || is_front_page() ){
//your home page content
}
else{
//other pages
}
For more here
Hope its works..
Upvotes: 1
Reputation: 9782
use is_front_page() to determine the home page. like you only want slider on the home page then edit your header.php
file that consist the slider part and do something like this
if( is_front_page() ):
// Front Page stuff like slider and
// whatever you want
endif;
Upvotes: 1