Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-28-2012, 10:45 AM   #1
The Dawg
Confirmed User
 
The Dawg's Avatar
 
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
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.

The Dawg is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 11:12 AM   #2
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
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
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 11:24 AM   #3
The Dawg
Confirmed User
 
The Dawg's Avatar
 
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
Thanks.

I'll use this.

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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 12:06 PM   #4
The Dawg
Confirmed User
 
The Dawg's Avatar
 
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
Second note for anyone else who has this issue:

Seems home.php may be a reserved filename.
The Dawg is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 12:15 PM   #5
iwantchixx
Too lazy to set a custom title
 
iwantchixx's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: The Boonies
Posts: 12,860
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.
iwantchixx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 12:19 PM   #6
QuantumDesigns
Confirmed User
 
QuantumDesigns's Avatar
 
Industry Role:
Join Date: Feb 2012
Posts: 49
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).
__________________
Services: Web Design, Custom Development, PHP, MySQL, WordPress plugins, JavaScript, System Adminstration and more!

Content: Producing and selling Original Asian content. Contact me to buy.

ICQ: 706149662
SKYPE: valerianxx
QuantumDesigns is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 12:31 PM   #7
The Dawg
Confirmed User
 
The Dawg's Avatar
 
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
Yea, the cache thing was the first thing I did.

Everything is working correctly now.
The Dawg is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 12:34 PM   #8
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,327
Quote:
Originally Posted by harvey View Post
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.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.