• Resolved Tandhruil

    (@tandhruil)


    Hi !
    Theme : Customizr 3.5.1
    Website : https://www.92bulles.fr

    I’ve add the slider to the main page of the website and the limit seems to be 11 but I’ve fix this value to 5 ?

    Here is the code integrated to the page :

    [recent_post_slider limit="5" design="design-3" category="news" show_category_name="false" show_content="true" show_date="true" dots="true" arrows="true" autoplay="true" autoplay_interval="5000" speed="1000" content_words_limit ="40" post_type="post" show_author="false"]

    I use a child theme with a function.php file and there is 1 function with posts_per_page

    /*** Filtre widget par categorie */
    add_filter( 'widget_posts_args', 'my_widget_posts_args');
    function my_widget_posts_args($args) {
    if (has_tag('annu') ){//filtre les articles ayant une catégorie annuaire
    return array(
    'orderby' => 'post_title',
    'order' => 'ASC',
    'posts_per_page' => 100,//set the number you want here
    'no_found_rows' => true,
    'post_status' => 'publish',
    'ignore_sticky_posts' => true,
    'cat' => '11'//the current category id
    );
    }
    elseif ( is_category( ) ){// si les articles ont une autre catégorie
    $cat = get_queried_object();
    return array('posts_per_page' => 10,//set the number you want here
    'no_found_rows' => true,
    'post_status' => 'publish',
    'ignore_sticky_posts' => true,
    'cat' => $cat -> term_id//the current category id
    );
    }
    else { //Si les widget ne sont pas liés à une catégorie
    return $args;
    }
    }

    Could you help ?

    • This topic was modified 8 years, 1 month ago by Tandhruil.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hi,

    Thanks for the link. I have checked the shortcode and limit parameter is working fine.

    The code which you had sent, it looks like it only affects when widget is there.

    Can you please tell me in your WordPress post section is there any post that you had made sticky?

    According to my point of view that some sticky posts are coming in slider so it is extending limit.

    Please check and update me for the same.

    Thanks and Regards,
    WP Online Support

    Thread Starter Tandhruil

    (@tandhruil)

    It works, thanks a lot !

    Laurent

    Plugin Author Anoop Ranawat

    (@anoopranawat)

    Hello,

    If you like our plugin so please give me rate us it’s very useful to us.

    Thread Starter Tandhruil

    (@tandhruil)

    Already done ??

    • This reply was modified 8 years, 1 month ago by Tandhruil.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trouble with Limit Parameter’ is closed to new replies.