• Resolved farshid.t

    (@farshidt)


    Hi and thanks for the great Plugin.

    I have added the query_posts function before the main loop and it does work when the page is set as Front Page in WP Reading Settings.

    However the query returns blank if the page is not Front Page, such as “/?page_id=11”.

    Is this a bug or do you suggest any way to trace back the error?

    Thanks a lot!

    https://www.ads-software.com/plugins/featured-post/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sovit Tamrakar

    (@ssovit)

    Hello,
    can you paste your piece of code? so i can check what really is happening?

    Thread Starter farshid.t

    (@farshidt)

    Sure. But it turns out that there is conflict with my custom template. Nothing wrong on the plugin’s side.

    This is the relevant piece.

    <div class="container">		
    
    			<!-- FEATURED FILTERING -->
    			<?php query_posts($query_string."&posts_per_page=100&featured=yes"); ?>
    			<!------------------------>
    
    			<?php while (have_posts()) : the_post(); ?>
    	                     // show posts data, etc
    			<?php endwhile; ?>
    			<!-- /STOP LOOP -->
    			<?php wp_reset_query(); ?>
    
    		</div>	
    
    	</div>

    Thanks

    Plugin Author Sovit Tamrakar

    (@ssovit)

    did you try calling wp_reset_query() before query_posts() ?

    Plugin Author Sovit Tamrakar

    (@ssovit)

    Fixed?

    Thread Starter farshid.t

    (@farshidt)

    Sorry I couldn’t try during the weekend.

    wp_reset_query() doesn’t fix it, removing one of the template classes does. I guess a JS function is messing with it.

    I set my featured as front page, and it works fine there.

    Thanks anyway ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured posts only showing in Front Page’ is closed to new replies.