8791 sujets

Développement web côté serveur, CMS

Bonjour à tous,
j'ai un site wordpress qui utilise le plugin Yet Another Featured Posts.

J'appelle la fonction du plugin pour afficher les posts à la une et une boucle wordpress qui affiche tous les posts. Je souhaite bien entendu exclure de la boucle WP, les featured posts pour éviter d'avoir des doublons.

J'ai fait ce code, mais il ne marche pas Call to undefined function get_featured_posts_id().
Vous avez une petite idée pour me filer un coup de main ?
Merci par avance


 <!-- Get posts -->
<?php  get_featured_posts(array('method' => 'the_loop')); while (have_posts()) : the_post(); ?>
<div class="allpost">	
			       <div class="post-image">
                            <a href="<?php the_permalink(); ?>">
                               <span class="new"></span>
                                <?php echo the_post_thumbnail('thumb'); ?>
                            </a>
                        </div>
                        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                        <p class="post-meta"><?php the_time('j F Y') ?> |  <?php the_category(', ') ?></p>

                        <div class="post-content">
                            <div class="entry"><?php the_excerpt(); ?>
                                <span class="more"><a href="<?php the_permalink(); ?>"><?php _e('En savoir plus','theme'); ?></a></span>
                            </div>
                        </div>
                    

                </div> <!-- End AllPost -->
                 <div class="cb"></div>

  <!-- kill loop -->
<?php endwhile;?>

        <!-- Start Wordpress Loop -> Display 4 Posts-->
 <?php  if ( function_exists('get_featured_posts') ) $arrfeatposts = get_featured_posts_id(); query_posts('post__not_in=' . $arrfeatposts . 'posts_per_page=4&paged=' . $paged);
    if(have_posts()): while(have_posts()) : the_post(); ?>
 
                <div class="allpost">	
			       <div class="post-image">
                            <a href="<?php the_permalink(); ?>">
                                <?php echo the_post_thumbnail('thumb'); ?>
                            </a>
                        </div>
                        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                        <p class="post-meta"><?php the_time('j F Y') ?> |  <?php the_category(', ') ?></p>

                        <div class="post-content">
                            <div class="entry"><?php the_excerpt(); ?>
                                <span class="more"><a href="<?php the_permalink(); ?>"><?php _e('En savoir plus','theme'); ?></a></span>
                            </div>
                        </div>
                    

                </div> <!-- End AllPost -->
                 <div class="cb"></div>
<?php endwhile; endif; ?>
Tu as essayé d'aller poster sur le forum WP ? Tu auras plus de retour avec la communauté WP elle-même.