GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress Help: WP is not using my custom page (https://gfy.com/showthread.php?t=1059296)

The Dawg 02-28-2012 10:45 AM

Wordpress Help: WP is not using my custom page
 
I have set the index as static (home.php)

So I want the blog pages to be shown under /blog

The index (home.php) loads up fine, header and custom setup.

The blog posts load, BUT:

The blog page is not updating. It is loading the old header, SO the css changes are not being loaded.

I read something about the hierarchy, but I have no idea what to change.

:helpme

harvey 02-28-2012 11:12 AM

I'm not 100% sure what do you mean, anyway, if you're using 2 headers (is that what you mean?) then you need to require the correct header, like this:

Code:

<?php include(TEMPLATEPATH.'/header2.php'); ?>
however, to avoid mistakes, juts use conditionals. Replace EVERYTHING you have in header.php with something like this:

Code:

<?php
if (is_front_page()){
        <?php include(TEMPLATEPATH.'/mainheader.php'); ?>
}
elseif (is_single()){
        <?php include(TEMPLATEPATH.'/header-single.php'); ?>
}
else {
        <?php include(TEMPLATEPATH.'/header1.php'); ?>
}
?>

this code will allow you to use 1 header for your main static page, a different one for single pages (if you need it) and everything else (such as pages) will use a default header. Play with it as you wish

The Dawg 02-28-2012 11:24 AM

Thanks.

I'll use this. :thumbsup

The other problem was that I moved the blog from a sub-dir to the root and the single was looking at the old folder.

The Dawg 02-28-2012 12:06 PM

Second note for anyone else who has this issue:

Seems home.php may be a reserved filename.

iwantchixx 02-28-2012 12:15 PM

Silly question but did you clear your browser cache? I find that mozilla based browsers tend to keep using a cached version of css and caused me headaches similar to yours.

QuantumDesigns 02-28-2012 12:19 PM

Yeah, first clear your cache and make sure you're not just searching for a problem that's not there.

Second, make sure all of your stylesheets and other included files have the correct paths in your code (as harvey mentioned).

The Dawg 02-28-2012 12:31 PM

Yea, the cache thing was the first thing I did.

Everything is working correctly now. :thumbsup

fris 02-28-2012 12:34 PM

Quote:

Originally Posted by harvey (Post 18787243)
I'm not 100% sure what do you mean, anyway, if you're using 2 headers (is that what you mean?) then you need to require the correct header, like this:

Code:

<?php include(TEMPLATEPATH.'/header2.php'); ?>
however, to avoid mistakes, juts use conditionals. Replace EVERYTHING you have in header.php with something like this:

Code:

<?php
if (is_front_page()){
        <?php include(TEMPLATEPATH.'/mainheader.php'); ?>
}
elseif (is_single()){
        <?php include(TEMPLATEPATH.'/header-single.php'); ?>
}
else {
        <?php include(TEMPLATEPATH.'/header1.php'); ?>
}
?>

this code will allow you to use 1 header for your main static page, a different one for single pages (if you need it) and everything else (such as pages) will use a default header. Play with it as you wish

i would just use get_header() for multiple headers.

single.php instead of get_header() use get_header('single');

header-single.php it will look for.


All times are GMT -7. The time now is 02:14 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123