- This topic has 10 replies, 2 voices, and was last updated 7 years, 8 months ago by Mahesh.
-
AuthorPosts
-
July 21, 2016 at 12:15 am #95842huskerParticipant
I searched other topics but could not find an reference.
is there a way to have more than 20 Featured Sliders?
Husker
July 21, 2016 at 10:44 am #95860MaheshKeymaster@husker: Adding more slider will make your site slower. But if you do want to have it anyway, I can help you. Are you a developer or have a good programming knowledge? because the customization for this is complicated. If you are okay with programming, I can guide you through. If not I recommend you to hire a customizer for this.
https://catchthemes.com/hire-customizer/Regards,
MaheshJuly 27, 2016 at 6:32 am #96096huskerParticipantHi Mahesh,
I have gotten pretty good at programming in WordPress.
I would appreciate the steps to add some additional sliders.
Brian
September 5, 2016 at 11:38 pm #98801huskerParticipantHi,
I have not heard back since you said you would guide me through the process.
September 6, 2016 at 11:05 am #98816MaheshKeymaster@husker: Aww, sorry about that. Okay, if you want to have more than 20 sliders, you’ll need to modify some code. The simplest way (not-recommended) to do is just edit the core theme file and increase the number. Since, while updating, you’ll lose the changes, you’ll need to make sure you do this change every-time you update the theme.
Other way is really tricky one, you’ll need to remove the current control and add a new one. Please add the following codes in you child theme’sfunctions.php
:function catchresponsive_child_customize_register( $wp_customize ) { $wp_customize->remove_control( 'catchresponsive_theme_options[featured_slide_number]' ); $wp_customize->add_control( 'catchresponsive_theme_options[featured_slide_number]' , array( 'active_callback' => 'catchresponsive_is_demo_slider_inactive', 'description' => __( 'Save and refresh the page if No. of Slides is changed (Max no of slides is 25)', 'catch-responsive' ), 'input_attrs' => array( 'style' => 'width: 45px;', 'min' => 0, 'max' => 25, 'step' => 1, ), 'label' => __( 'No of Slides', 'catch-responsive' ), 'priority' => '2.1.4', 'section' => 'catchresponsive_featured_slider', 'settings' => 'catchresponsive_theme_options[featured_slide_number]', 'type' => 'number', ) ); } function child_customzier() { add_action( 'customize_register', 'catchresponsive_child_customize_register' ); } add_action('init', 'child_customzier');
Note: This will make max-number of slides to 25, you can adjust it to your desired number in by changing the max value in the above code.
Regards,
MaheshSeptember 7, 2016 at 11:06 am #98855huskerParticipantWhich core Theme File is the code in to increase from 20? I have been looking as I want to start there first before modifying my child theme.
Brian
September 7, 2016 at 12:52 pm #98863MaheshKeymaster@husker: For that, edit the file in
inc/customizer-includes/catchresponsive-customizer-featured-slider.php
then go to line 171 and change Max no of slides is 20 to your desired number, this is the description text. Change line 175'max' => 20
to your desired number of slider. This is the actual number of slides.
Let me know if any problem.Regards,
MaheshSeptember 8, 2016 at 11:13 am #98938huskerParticipantThat file is not in the editor of the main theme files. Is is part of the Customize Section? If so, how do you save changes using source? I can add to Customize?
Is is located somewhere else?
Brian
September 8, 2016 at 2:40 pm #98948MaheshKeymaster@husker: Yes, it is a part of Customize Section and the file cannot be directly edited from WordPress’s theme-editor page. You’ll need to use FTP, or you can simply add the above function I’ve provided to the child theme’s
functions.php
Regards,
MaheshSeptember 9, 2016 at 9:04 am #99017huskerParticipantThanks Mahesh.
I edited the file in Cpanel and it works great. Easy to find and edit once I got there.
Brian
September 9, 2016 at 12:08 pm #99033 -
AuthorPosts
- The topic ‘More than 20 Featured Sliders’ is closed to new replies.