Need quick help with wordpress

Status
Not open for further replies.

ed146

Still Hustlin'
May 23, 2007
430
2
0
I would like to modify my page.php file so that when a specified page is shown, it selects different header, footer, and a side bar, else show the normal template.

Someone help me with mod!!
 


If rograndom doesn't help you or you don't read him PM, you want to look for a PHP conditional loop. You'll need to edit a few of your template pages to check if your "specified" page is being shown, if yes it takes the loop for header / footer / sidebar / etc, if no it defaults to the original. It's easy and free to add. I can post some examples here if you need them. Or check the Wordpress codex.
 
The basic answer for anyone else is something along these lines (this is for the header include, repeat for sidebar, footer, etc.):

<?php
if(is_page('id-of-special-page-here')) {
include('special-header.php');
} else {
get_header();
}
?>

Make sure you have actually created your 'special-header.php' file, etc, and replace the regular <?php get_header(); ?> call with the above.
 
Status
Not open for further replies.