Hi there, php experts.
How do you combine conditions in a conditional php statement?
If this is a single post AND is in category('blah blah')
[then show the ShareThis widget - have the php for this]
Thanks for your help...
Hi there, php experts.
How do you combine conditions in a conditional php statement?
If this is a single post AND is in category('blah blah')
[then show the ShareThis widget - have the php for this]
Thanks for your help...
I believe this will help you along ...
if ( is_single() && in_category('blah blah') ) {
// Share_This widget code
}Thank-you cais, that's perfect.
One other question - how do I say NOT in category ('blah blah').
In other words - if is single and NOT in category=blah blah then share-this widget code
The exclamation mark ( ! ) is used for 'not', such as:
if ( is_single() && !in_category('blah blah') ) {
// Share_This widget code
}Wow, thanks so much for your help.
You're welcome.
This topic has been closed to new replies.