• Hello,
    I am having trouble displaying shortcodes correctly on my main post content. (Example – You can see all the [soundcloud id=”]. I know it’s not a problem with the plugin because no shortcodes work.)

    Instead of using:

    <?php the_content(); ?>

    I am currently using:

    <?php echo preg_replace("/\< *[img][^\>]*[.]*\>/i","",get_the_content(),1); ?>

    which hides the first image from each post because my featured image is automatically displayed on top. However, even when I replaced what I’m currently using back with the normal ‘php the_content’ code it is still not displaying my shortcodes correctly. Is there a way to filter the first image out and include shortcodes via function.php OR some other workaround? I feel like it’s something easy I’m overlooking causing this error.

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content Not Displaying Shortcodes’ is closed to new replies.