Hello,
the sticky posts that appears in the sliders also appears below the slider on the home page … how to change this (keeping them in slider but not below on home page) ?
thanx
a negative condition on the main loop in index.php.
while( have_posts() ) : the_post();
php if(!is_sticky()):
php get_template_part( ‘content’, get_post_format() );
php endif;
php endwhile;
Just insert that second line and you should be fine.
Hope this helps.
-
This reply was modified 12 years, 1 month ago by Helder.
-
This reply was modified 12 years, 1 month ago by Helder.
sorry but this is not working, or maybe a <?php is missing somewhere ?
Helder, your tip was extremely helpful. I just want to add that there is one additional line that needs to be added for it to work:
php if( have_posts() ):
php while( have_posts() ) : the_post();
php if(!is_sticky()):
php get_template_part( ‘content’, get_post_format() );
php endif;
php endwhile;
Add line 2 and line 5. Could never have figured it out without the starting tip! Thx.
I solved it another way, I added the following lines to the function.php (as suggested by someone on wordpress forum) :
sh..t after three editing : not possible to add a piece of code here ? the php tags are all gone and half of what I added disappeared … ggrrr