Hi all,
I have a similar issue…
I’ve tried to pull amp templates from another directory in another plugin I’ve just created, giving a full path to it, but it didn’t work…
I’ve also setted paired flag in config page (and in the code too…) as you can see in the following code, wrapped in my custom plugin function:
public static function register_template_dir() {
// set custom template's dir
add_theme_support( 'amp', array(
'paired' => true,
'template_dir' => self::$plugin_fs_dir. 'amp-templates',
),
) );
}
This function is loaded when “after_setup_theme” hook is fired by calling
add_action( 'after_setup_theme', array( 'myplugin', 'register_template_dir'), 6 );
Is it possible to give a full path or custom templates have to be only putted in AMP plugin relative dir?
My current version of AMP plugin is 1.2.2 and I found amp original templates are in
\wp-content\plugins\amp\templates
So, my next question, in case is not possible to give a path outside AMP plugin, is where exactly I have to put my custom templates?
Thamks in advance for help.
Nick