featured post appears twice on page (4 posts)

  1. hunted by a geek
    Posted 3 years ago #


    Would anyone know how I could modify this code so that the featured post will only appear once on the page and not again in the post excerpt section? As I am using images, my readers will get double vision, and on mobile devices the post will feature twice one under the other.

    $count = 1;
    if (is_home()) {
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    		'post__not_in' => $do_not_duplicate,
    		'paged' => $paged
    	)); }
    if ( function_exists( 'get_smooth_slider' ) ) { get_smooth_slider(); }
    if (have_posts()) : while (have_posts()) : the_post(); ?>

    My theme developers won't offer support on this as I have used Smooth Slider instead of their default slider. The support for Smooth Sider is hopeless.


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

    please paste the full code of the template into a pastebin and post the link to it here - http://codex.wordpress.org/Forum_Welcome#Posting_Code

    how to avoid duplicates in multiple loops is also described here in the Codex: http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action

  3. hunted by a geek
    Posted 3 years ago #

    Oops sorry, is this ok? http://pastebin.com/2XPVebju

    I did read that article previously and I have attempted to edit my index3.php code with the tutorial "Multiple Loops in Action" but I haven't had any luck. If anyone could point me to which code I should replace with the code in the tutorial, I would be so grateful.

    THanks :)

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

    loking at the code, with the featured post coming from a function or from the slider, this problem is (at least for me) too complex to suggest solutions within the forum;

    you will possibly need to edit the slider and use global variables to get the post information to the loop (?)

    consider to post a job at http://jobs.wordpress.net/

Topic Closed

This topic has been closed to new replies.

About this Topic