Adding More Slides in Header?

First off, my thanks to the devs of this outstanding theme!

Secondly, is there any way to add more slides to the slider in the header? I know it gives us the ability to put up to 5, but I would like to add at least couple more for a project that is encompassing bringing a website and digital signage together under the same roof, so to speak. The full screen header slider is a great way to accomplish that!

Cheers!

Hi,

This can be accomplished with modification of theme folder / inc / slider.php file, but you must be a bit familiar with coding. You have to duplicat every block of code with slider_title_5, slider_subtitle_5, etc. in it, and to change it to slider_title_6, slider_subtitle_6 etc. for as many times as you want. Please use some code editing software for this like https://notepad-plus-plus.org/ for example.

Best Regards

Excellent! Thank you for your help. I’ll give this a try and see what I can come up with.

Hello,
I use Theme Sydney. I too would like to expand the FrontPage Slider on 10 slides.
As recommended by Dimikjones I have changed and saved the slider.php File.
Unfortunately it does not. It will be listed still the 5 slides.
My Website Link: http://bo-ols.de/bo
About Help I would be happy and thank you

@Alstersurfer

Hello there,

Excellent, but that was easier part :slight_smile: . Sometimes I do not offer entire guide, since users are not skilled enough.

Here is the second part:
You have to edit theme folder / inc / customizer.php and to add additional slides to your back-end options. Locate this part of code:

//Image 5
    $wp_customize->add_setting('sydney_options[info]', array(
            'type'              => 'info_control',
            'capability'        => 'edit_theme_options',
            'sanitize_callback' => 'esc_attr',            
        )
    );
    $wp_customize->add_control( new Sydney_Info( $wp_customize, 's5', array(
        'label' => __('Fifth slide', 'sydney'),
        'section' => 'sydney_slider',
        'settings' => 'sydney_options[info]',
        'priority' => 26
        ) )
    );    
    $wp_customize->add_setting(
        'slider_image_5',
        array(
            'default-image' => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'slider_image_5',
            array(
               'label'          => __( 'Upload your fifth image for the slider', 'sydney' ),
               'type'           => 'image',
               'section'        => 'sydney_slider',
               'settings'       => 'slider_image_5',
               'priority'       => 27,
            )
        )
    );
    //Title
    $wp_customize->add_setting(
        'slider_title_5',
        array(
            'default' => '',
            'sanitize_callback' => 'sydney_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'slider_title_5',
        array(
            'label' => __( 'Title for the fifth slide', 'sydney' ),
            'section' => 'sydney_slider',
            'type' => 'text',
            'priority' => 28
        )
    );
    //Subtitle
    $wp_customize->add_setting(
        'slider_subtitle_5',
        array(
            'default' => '',
            'sanitize_callback' => 'sydney_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'slider_subtitle_5',
        array(
            'label' => __( 'Subtitle for the fifth slide', 'sydney' ),
            'section' => 'sydney_slider',
            'type' => 'text',
            'priority' => 29
        )
    );

duplicate it for slide 6 and so one. It is important to start priority for next slide from 33. Below is working example for Image 6 (slide 6), and you can append it after end of Image 5 block of code. If changes inside slider.php are correct you will be able to save another slide and to display it without problems. If you succeed, examine my changes and add remaining slides.

//Image 6
    $wp_customize->add_setting('sydney_options[info]', array(
            'type'              => 'info_control',
            'capability'        => 'edit_theme_options',
            'sanitize_callback' => 'esc_attr',            
        )
    );
    $wp_customize->add_control( new Sydney_Info( $wp_customize, 's6', array(
        'label' => __('6 slide', 'sydney'),
        'section' => 'sydney_slider',
        'settings' => 'sydney_options[info]',
        'priority' => 33
        ) )
    );    
    $wp_customize->add_setting(
        'slider_image_6',
        array(
            'default-image' => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'slider_image_6',
            array(
               'label'          => __( 'Upload your 6 image for the slider', 'sydney' ),
               'type'           => 'image',
               'section'        => 'sydney_slider',
               'settings'       => 'slider_image_6',
               'priority'       => 34,
            )
        )
    );
    //Title
    $wp_customize->add_setting(
        'slider_title_6',
        array(
            'default' => '',
            'sanitize_callback' => 'sydney_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'slider_title_6',
        array(
            'label' => __( 'Title for the 6 slide', 'sydney' ),
            'section' => 'sydney_slider',
            'type' => 'text',
            'priority' => 35
        )
    );
    //Subtitle
    $wp_customize->add_setting(
        'slider_subtitle_6',
        array(
            'default' => '',
            'sanitize_callback' => 'sydney_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'slider_subtitle_6',
        array(
            'label' => __( 'Subtitle for the fifth slide', 'sydney' ),
            'section' => 'sydney_slider',
            'type' => 'text',
            'priority' => 36
        )
    );

All the Best!

Hello Dimikjones,

many thanks for the quick reply.

And I, a Newbe on the WordPress-Concept, I want to especially thank you for the detailed documentation to my questions.

Everything has quickly and smoothly functioning.

Best regards
Bodo

You’re welcome :slight_smile:

And thank you for using Sydney Theme!

All the Best!

I have done all of the above, and it asked me for a 6th slide but nothing appears on the actual site when i upload a picture

@dudeskin

Hello there,

As you can see user above managed to achieve this so there is probably some error in your code, so please read instructions again, and repeat procedure.

Best Regards!

Hello there,

I have the same issue as @dudeskin. I did all the above changes the sixth slider showed in the admin panel but when I upload the image nothing is shown on the slider.

If there is any other function or array that need to be edit please let me know. Your help is really appreciated.

I am waiting for your reply!

Thank you!

I would like to add a question here: if I make the proposed mods to the code, will they survive a theme update?

@alexandre.facc10

Hello,

Changes will be lost after theme update so if you are going to increase amount of slides, then store changed files on your PC so you can overwrite original ones after each update.

Best Regards!

Help!

I have set images to all 5 slides but for some reason, a blank slide appears on number 3. If I remove the image from slide number 3, it still shows a blank slide between slides 2 and 4. How to I make the image on the third slide appear?

The instructions work great. I was able to add 1o slides to the Sydney theme.
My question is, will the additional slides (6-10) be lost when theme Sydney 1.34 is up dated to the next version?

I have created and activated a Sydney child theme, however the customizer.php and slides.php edits do not work on the child theme. They work on the parent Sydney theme only.

Thanks for the code. I tried this in the Free version, which works fine, but not in the Pro. Got error message: wants an ‘:’ instead of ‘{’ on line 143 in the inc/slider.php. Please respond asap, thank you.

Hi to all,

@pase

Glad to hear that you managed to extend number of sliders without problem. Files which are being modified are not default WordPress template files so they cannot be inherited from child theme in regular way, so it is best to save them to your pc, and after each update overwrite theme with modified field.

@ingridcerisehotmail-com
Error means that you have some error in your code, so go trough instructions again. I also have to mention that in pro version you can use CRELLY SLIDER instead, you you don’t need to extend number of slides when you use it, since it allows you a lot more options.

Best Regards!

So you are saying/writing that the inc/slider.php and inc/customizer.php is the same to both Free and Pro version?

I have tried in both versions and in the Free it works but not in Pro. Before I check the code, it may be easier to ask you, dimikjones (or others). Is that so?

If I use Crelly Slider I have to do all things all over again. And what I can see it doesn’t go in full page as the default slider does? To much work when I only need this one more image in the slider… It is the only thing left before publicizing.

Thanks again for fast reply and hope you will answer that fast again! :slight_smile:

@ingridcerisehotmail-com

Hi again,

I ma saying that you have error in your code, and there are differences in these files. This topic is over 1 year old and users with enough codding knowledge find it helpful but some users have problems. This is modification and it needs custom work, and explanation is provided at that time, and by following instructions you should be able to extend number of slides, but we are not in position to do this for you. Since topic is still hot, you can maybe submit feature request for this, and I will see with Vlad if this can be implemented in Pro version at least for some future update.

All the Best!

I hope you will help me to solve this, I bought the Pro version believing that the header slider was able to expand with few more images, but so it was not. Of course I am happy that I can use this support thanks to paying for the Pro.

I have done according to the support guide but with the files from the Pro (inc/slider.php and inc/customizer.php) and got the error information as I wrote before; “there is a { instead of a : in the code”… so I understand that the guide above is only regarding the Free version. So it would be nice that the support also could support the Pro version as well…

So to go back to the Free version now takes too much time, and working up a new slider with Crelly Slider is also a bit too late. I think that to adjust the code get faster but I may be wrong?

Hoping that Vlad will help me asap! :slight_smile:

I have solved it!! I red through the whole code and change it manually, and the guides below gave me the hint to manage it! Thank you!