Inline PHP for WordPress 2.8.6 (Conditional)
-
WORDPRESS VERSION: 2.8.6 (I just did an upgrade from 2.7. everything was working GREAT with 2.7!!)
INLINE PHP TO RUN (pasted on the first line of EVERY article):
< ?php if (is_single()) { ?>
< ?php include (TEMPLATEPATH . ‘/ads-single-top.php’); ?>
< ?php } ?>
(which basically is a conditional php code that includes adsense ONLY when viewing the article in single.php)The php works great when viewing the article in single.php.. but once it comes to index.php.. it doesnt work. On index.hph I am using “<?php the_excerpt() ?>”
I tried searching for plugins that RUN PHP INLINE code.. and they work.. but only on single.php (like I said before)
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘Inline PHP for WordPress 2.8.6 (Conditional)’ is closed to new replies.