Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @onlinerockers

    If you are using shortcode in the content it should not be a problem, if you are using shortcode in theme make sure you are using it properly.

    Alternatively, make sure you have not suppressed the plugin in AMP settings.

    Thread Starter Nirmal Kumar

    (@onlinerockers)

    @milindmore22 The shortcodes are custom created in theme by adding functions at functions.php of Genesis child theme.

    The actual theme used for desktop is Genesis, while the AMP theme is set as Twenty Twenty-one, as I could not find Genesis in the list.

    So I guess AMP theme does not go through the Genesis theme files and hence the shortcodes are not being executed.

    What is the best solution for this?

    Plugin Support Milind More

    (@milindmore22)

    So I guess AMP theme does not go through the Genesis theme files and hence the shortcodes are not being executed.

    Yes, correct!

    I will recommend using the custom function in the custom plugin, which will reflect on both Genesis and reader mode (Twenty Twenty One) theme. (if you add that to the custom plugin be sure to remove it from genesis to avoid duplication )

    Thread Starter Nirmal Kumar

    (@onlinerockers)

    Thanks @milindmore22 I will try it out and let you know its working status.

    Plugin Author Weston Ruter

    (@westonruter)

    We are going to be adding a theme compatibility scanning feature that will proactively identify this problem in the future. The guidance, however, is the same: move shortcodes, blocks, post types, and taxonomies from being defined in the theme to instead be defined in a plugin.

    Thread Starter Nirmal Kumar

    (@onlinerockers)

    That’s great @westonruter

    I have just created a site specific plugin and the issue has been fixed now.

    <meta property=”fb:pages” content=”2397092793655754″ />

    Ugh, this is terrible. I have a ton of features that I’ve built into my child theme specific for displaying integrated information and custom styling. There should be an alternative here – like having a function to enable the same function in AMP from functions.php.

    Plugin Author Weston Ruter

    (@westonruter)

    @douglaskarr Transitional template mode may be a better fit for you if you are have to use the theme. In Transitional mode, the same theme templates are used in AMP and non-AMP.

    Nevertheless, if your theme relies heavily on JavaScript it may not work acceptably in AMP.

    If you can extract the custom functionality into a plugin then it can be shared by your active theme and a selected Reader theme in the Reader template mode.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Shortcodes are not being executed in AMP pages’ is closed to new replies.