• Resolved ceejaymac

    (@ceejaymac)


    Hi,

    For some reason when I place this in the template file the actual post content isn’t displayed anymore;
    <?php echo do_shortcode('[owl-carousel category="bio_toni" singleItem="true" autoPlay="true" navigation="false"]'); ?>
    Followed by;

    <?php the_content(); ?>

    But if I do it the other way around it does give an output of the post content. (obviously in the wrong order.)

    Any fix for this would be highly appreciated.

    https://wordpress.org/plugins/owl-carousel/

Viewing 1 replies (of 1 total)
  • Thread Starter ceejaymac

    (@ceejaymac)

    Since the shortcode was only used on one template page, and only on one page in particular …

    Did the following work around;

    Instead of <?php the_content(); ?>

    I used;

    <?php
                        $id=heregoespostid;
                        $post = get_post($id);
                        $content = apply_filters('the_content', $post->post_content);
                        echo $content;
                        ?>

Viewing 1 replies (of 1 total)

The topic ‘do_shortcode before the_content() gives an error’ is closed to new replies.