You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On second thought, let's not do this. The template_dir is prepended to the currently-queried template file (e.g. single.php) and it is then passed into locate_template() which does not allow absolute paths. With #934 a theme will be able to opt-in to paired mode without having to do a pointless 'template_dir' => './' via a proposed extension to what the available_callback returns.
If you currently add
amp
theme support for paired mode via:Then it will fail to find the template dir since it is expecting relative paths, it will redirect to the non-AMP version with this code:
https://github.com/Automattic/amp-wp/blob/5f635d27d64f50eeba4c0710c84d929342f967b5/includes/class-amp-theme-support.php#L675-L690
Instead, you currently have to do:
This isn't totally intuitive. (Aside: indicating paired mode with
template_dir
is also not intuitive. For that, see #934.)The text was updated successfully, but these errors were encountered: