• Resolved jonpfote

    (@jonpfote)


    I want to create a new slider template in my theme, but in get_templates() (“xo-slider/inc/main.php” on line 123) you only search in the plugin folder. Only if a template already exists in the “plugin folder”, this plugin looks in the “theme dir” if you want to overwrite it.

    I want to add a template which is in the theme folder, but I do not want to overwrite any original theme. In the end, I want to have all original templates and my custom additional one.

    Is this possible?

    I currently use version 3.4.2. When I create “wp-content/themes/mytheme/xo-slider/templates/default/template.php” it overwrites the “Default” template. I want to create “…/xo-slider/templates/mynewtemplate/template.php” but I cannot select it as an option for the slider template.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ishitaka

    (@ishitaka)

    I have released a version (3.5.0) that allows the addition of original templates. Try it.

    Note that the directory name, class name and class id variable should be the same name.

    Example if the directory name is “custom”:

    class XO_Slider_Template_Custom extends XO_Slider_Template_Base {
    	/**
    	 * Template ID.
    	 *
    	 * @var string
    	 */
    	public $id = 'custom';
    Thread Starter jonpfote

    (@jonpfote)

    Thank you very much! I tried it and it is now working as expected.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add template in template folder which does not exist in plugin folder’ is closed to new replies.