Executing PHP in before_loop
-
I’m trying to put some text at the top of the page, only for one blog category, so I’ve added some PHP to the before_loop hook, but it’s not working. If I uncheck “execute PHP” I see the text on all pages (as one would expect), but when I check it, not only does my text not show up as intended, but even if I just add some test characters outside the PHP, they don’t show up if I’m telling it to execute PHP. Also if I add a really simple “hello world” sort of bit of PHP, that doesn’t work either.
Here’s the code I’m using, what am I doing wrong?
<?php
if (is_category(‘Videos’) ) {
<h1>Videos</H1>
<P>(client) provides legal advice to our clients in a number of areas. The following videos will provide you with a brief overview of those areas of the law with some suggestions for your consideration prior to scheduling an appointment with the appropriate attorney in our firm.
}
?>
The topic ‘Executing PHP in before_loop’ is closed to new replies.