- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
So I was trying to use conditional php includes to customize an existing WordPress Template I just bought.
I know nothing about PHP, however I’ve been trying to search and find answers as a go along. Something that I have not been able to figure out is how to do a conditional PHP Include. Everytime I try, I get a blank white page :? . Heres what I tried and my source.
The source code from – http://codex.wordpress.org/Category_Templates
This is the text to describe category A
This is the text to describe category B
This is some generic text to describe all other category pages,
I could be left blank
what I turned it into
Thanks in advance and sorry if it is a stupid question :oops: .
Because what you are trying to do is all php you don’t need to keep switching in and out:
Although, I don’t think it would actually stop it from working – the syntax is still correct in what you have done. The other reasons it might not work are as follows:
Of course, it also won’t include if is_category(‘somecategory’) returns true :P