[resolved] the_content() bug (3 posts)

  1. rjoac09
    Posted 3 years ago #

    I have a problem with a plug in I am currently using called "Dynamic Content Gallery" witch generates a slideshow and I only want to use it at my main page, so i add this piece of code in my page.php inside my theme folder:

    <?php if (is_front_page()) { ?>
    			<?php dynamic_content_gallery(); ?>
    		 <?php } ?>

    This works perfectly except for one thing, my content becomes a random post instead of the content written in the page. this only happened on my main page since it's the only place it's inserted to. However it works if I put it after the content div, but I want the slideshow to appear on the top of the page, this makes no since to me. Any help would be appreciated.

  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    possibly caused by the 'Dynamic Content Gallery' code;

    try to add wp_reset_query(); directly after dynamic_content_gallery();

    if this does not help, you need to disect the plugin code to find how the plugin creates the query for the gallery posts.

  3. rjoac09
    Posted 3 years ago #

    You are a freaking lifesaver, been dealing with this all day and you fix it with one little line of code. Thanks allot man :D

Topic Closed

This topic has been closed to new replies.

About this Topic