• Resolved reflectiondigital

    (@reflectiondigital)


    Is there a way (either in the free or paid version) to have a custom slider design? I’ve modified one of the design templates but I don’t want to edit the core plugin files if possible.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thanks for reaching here.
    Apologize for this, But template overriding feature is not available at this moment.

    Thanks & Regards

    @reflectiondigital

    I’ve gone further than modification – I’ve created a 5th design template file.
    To make it work, I had to upload it to the plug-in’s template folder, and manually adjust the wppsac-function.php file to include the 5th template.
    I also had to add additional CSS to my theme to include the CSS for 5th design.
    I can then refer to the 5th design in the widget shortcode.
    It works like a dream – take a look at exciting-stuff.co.uk

    The only issue is that whenever WP Online Support do an update to the plug-in, it deletes my additional template file and removes my amendment to the wppsac-function.php file – but it’s no biggie to adjust the line again and reupload.

    Ideally, I need to find a way to adjust the wppsac-function.php in my theme’s functions file (with some sort of hook/filter I would have thought), and also make it look for the 5th design template in my theme folder rather than the plug-in template folder. Not sure how though.

    I’ll keep beavering away. I’ll let you know how I get on. Any suggestions / help most welcome!

    @reflectiondigital

    OK, first part sorted. Add something like this to your theme’s functions to change the themes available from the widget.

    // Change slider designs
    add_filter( ‘wppsac_slider_designs’, ‘new_wppsac_slider_designs’ );
    function new_wppsac_slider_designs() {
    $design_arr = array(
    ‘design-1’ => __(‘Design 1’, ‘wp-responsive-recent-post-slider’),
    ‘design-2’ => __(‘Design 2’, ‘wp-responsive-recent-post-slider’),
    ‘design-3’ => __(‘Design 3’, ‘wp-responsive-recent-post-slider’),
    ‘design-4’ => __(‘Design 4’, ‘wp-responsive-recent-post-slider’),
    ‘design-5’ => __(‘Design 5’, ‘wp-responsive-recent-post-slider’)
    );
    return apply_filters(‘new_wppsac_slider_designs’, $design_arr );
    }

    You’ll need to create your own template file, and also create matching CSS. Let me know if you need help with those.

    The template file currently needs to be stored in the plug-in template folder, which is reset during an update. Now working on that bit!

    Thread Starter reflectiondigital

    (@reflectiondigital)

    @zenithbootleg

    What I did was copy the entire shortcode function into my functions.php file and rename it to create a new, custom shortcode so that I could use my design5 file without having to hack the actual plugin each time it updated. The main change to the shortcode function was in the location of $design_file_path so that it looks in my theme directory. Then I put the design-5.php file into my theme as well.

    So I’m calling my own shortcode which calls my design file. It could break in a future update if they drastically alter the shortcode function, but hopefully that’s rare.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom design’ is closed to new replies.