Shortcodes / PHP disabled in WordPress Theme

The theme I’m using is Acid by Pure but that may not be relevant. The theme has a Portfolio section and shortcodes/php seem to be disabled on the Portfolio pages. Inserting a shortcode in the editor (in Text/HTML mode) results in the shortcode displaying on the page like [shortcode] rather than converting. Using do_shortcode does nothing even after trying different plugins to enable PHP in pages/posts. Adding do_shortcode directly to the single-portfolio.php file works, however I need to use a different shortcode on each different Portfolio entry. Is there something I should look for somewhere that would be disabling shortcodes that I can remove, or does anyone have any ideas on how to enable PHP in these specific Portfolio items as the plugins to enable PHP in posts/pages don’t appear to affect this area.

Related posts

1 comment

  1. Found the solution. Not sure I understand it. But the loop in the theme was:

    <?php echo $the_content; ?>
    

    But I changed it to the following and now shortcodes are enabled:

    <?php echo apply_filters('the_content',$the_content);?>
    

Comments are closed.