Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #95842
    husker
    Participant

    I searched other topics but could not find an reference.

    is there a way to have more than 20 Featured Sliders?

    Husker

    #95860
    Mahesh
    Participant

    @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,
    Mahesh

    #96096
    husker
    Participant

    Hi Mahesh,

    I have gotten pretty good at programming in WordPress.

    I would appreciate the steps to add some additional sliders.

    Brian

    #98801
    husker
    Participant

    Hi,

    I have not heard back since you said you would guide me through the process.

    #98816
    Mahesh
    Participant

    @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’s functions.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,
    Mahesh

    #98855
    husker
    Participant

    Which 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

    #98863
    Mahesh
    Participant

    @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,
    Mahesh

    #98938
    husker
    Participant

    That 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

    #98948
    Mahesh
    Participant

    @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,
    Mahesh

    #99017
    husker
    Participant

    Thanks Mahesh.

    I edited the file in Cpanel and it works great. Easy to find and edit once I got there.

    Brian

    #99033
    Mahesh
    Participant

    @husker: Thank you for your appreciation. Have a nice day!

    Regards,
    Mahesh

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘More than 20 Featured Sliders’ is closed to new replies.