Page template files not loading correctly (2)
-
(NOTE: I’m reposting because previous post will not accept any new posts; shows topic closed.)
What’s causing the mixup in the following page load?
I’ve created a home.php page template that specifies home1.php and home2.php files for loading in left and right sidebars, but instead, these sidebar files are loading on index.php page, while sidebar files coded to load on index.php are loading on my home.php page.
Prior to this, my index.php loaded fine with information in main-col and with sidebar1.php and sidebar2.php in sidebar1 div and sidebar 2 div.
Now, home1.php and home2.php load in sidebars on index.php instead of sidebar1.php and sidebar2.php as coded, and CSS for sidebar1 div and sidebar2 div appears to be ignored (compare 2 links referenced below)
Also, no content now loads in main-col div of index.php.
See- https://lifegivingspring.info/wordpress/
versus https://lifegivingspring.info/wordpress/home
I’m using the following code with sidbar 1 div and sidebar 2 div,
to load sidebar1.php and sidebar2.php on index.php:
<?php include (TEMPLATEPATH . ‘/sidebar1.php’); ?>
<?php include (TEMPLATEPATH . ‘/sidebar2.php’); ?>On home.php, sidebar1.php and sidebar2.php load in sidebar1 div and sidebar2 div instead of on index.php where they are supposed to load; and home1.php and home2.php do not load in sidebar divs on home.php as they should.
See- https://lifegivingspring.info/wordpress/
versus https://lifegivingspring.info/wordpress/home
I’m using the following code for sidbar 1 div and sidebar 2 div,
to load home1.php and home2.php on home.php template page:
<?php include (TEMPLATEPATH . ‘/sidebar1.php’); ?>
<?php include (TEMPLATEPATH . ‘/sidebar2.php’); ?>What could be causing the mixup in page load?
Forgot to mention, I’m using the following code at top of functions.php to create sidebars for applying widgets from dashboard:if ( function_exists(‘register_sidebar’) )
register_sidebar(array(‘name’=>’Sidebar 1’,));
register_sidebar(array(‘name’=>’Sidebar 2’,));
- The topic ‘Page template files not loading correctly (2)’ is closed to new replies.