• Resolved lmsoren

    (@lmsoren)


    Hello,

    I’ve search the forum but haven’t found the answer:

    How do I set the number of posts in the home page slider?

    Thank you in advance,

    /lmss

Viewing 5 replies - 1 through 5 (of 5 total)
  • There are no options to change via admin
    You have to change it in template via child theme

    Thread Starter lmsoren

    (@lmsoren)

    Thanks, and where exactly do I do that?

    1) Download Leaf child theme from here and load it via FTP in theme folder
    2) Copy home.php from original Leaf theme to your desktop
    3) Open the file with an editor like notepad and change number 5 in these lines with what you want:

    <?php
    if ( ! isset( $options['leaf_slider_cat']) || $options['leaf_slider_cat'] == -1 ) {
    $args = ( array( 'posts_per_page' => 5, 'post__not_in' => get_option( 'sticky_posts' ) ) );
    } else {
    $args = ( array( 'posts_per_page' => 5, 'category__in' => $options['leaf_slider_cat'], 'post__not_in' => get_option( 'sticky_posts' ) ) );
    }
    ?>

    4) Save and upload the file in child theme folder

    5) I forgot something obvious: active child theme

    Thread Starter lmsoren

    (@lmsoren)

    Okay, will try – thanks for your time!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Number of posts in slider’ is closed to new replies.