Slider shows last 5 five posts of the category you have chosen, and you have chosen a category with only two posts.
Thread Starter
Łukasz
(@lumay)
I’ve change on 2 and there is still the same…
<div id="iview">
<?php
if ( ! isset( $options['leaf_slider_cat']) || $options['leaf_slider_cat'] == -1 ) {
$args = ( array( 'posts_per_page' => 2, 'post__not_in' => get_option( 'sticky_posts' ) ) );
} else {
$args = ( array( 'posts_per_page' => 2, 'category__in' => $options['leaf_slider_cat'], 'post__not_in' => get_option( 'sticky_posts' ) ) );
}
?>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
That code works, I’ve just tested it. You should see only two posts with that.
Thread Starter
Łukasz
(@lumay)
so I see 3 slides (2 posts and 1 blank always…)
That code works, I’ve just tested it.
Probably you have changed something else in the wrong way.
Restore the original theme, install a clean child theme, activate it, make a copy of home.php from the original, put it in child and do the change over there and see that it works.
Edit: have you cleared your browser cache, and/or have you some cache plugin?
Thread Starter
Łukasz
(@lumay)
still the same 🙁
yeap I cleared my browser cache
If you don’t have some cache plugin, if you have deactivated all of your plugins just to test, and if you have only changed these 5 to 2 in a clean theme installation, there’s no other known (by me) reason why it shouldn’t work.
Thread Starter
Łukasz
(@lumay)
I’ve just turned off all plugins and it works… :] but which plugin is in conflict with leaf theme…
anyway thank you for your help
Activating a plugin one by one and every time checking the site you’ll discover the conflicting plugin. Maybe a jquery plugin or so.
Thread Starter
Łukasz
(@lumay)
Disqus Comment System – this plug is guilty :]
It’s an invasive plugin. WP default comment system should be enough.
Thread Starter
Łukasz
(@lumay)
@scarletcox thanks for the solution, I’ll check that best from Warsaw
You’re welcome. It certainly worked for my site, which was also caused by Disqus 🙂
We were having the same issues with the slider on our homepage which was caused from the Disqus plugin.
Really easy fix as listed above, or follow this link https://support.truethemes.net/?knowledgebase=disqus-plugin-conflict-with-jquery-slider