• Hello! I am trying to paste this code in custom_functions.php, but I keep getting an error. I then have to remove the code through my cPanel. One thing to note is that I am placing this code at the very end of custom_functions.php .. Any help is appreciated!

    function expiredpost(){
      if(in_category('expired')){
      ?>
        <div class="expired_img">
            <? echo "<img src='https://www.freebieshark.com/wp-content/uploads/2012/02/expired2.png'>"; ?>
         </div> <?
     }
    }
    add_action('thesis_hook_before_post', 'expiredpost');
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Whats wrong with this PHP code?’ is closed to new replies.