• Hi,

    when I switch to a standard Theme, the shortcode is working when I do a preview from mailpoet settings page.

    But when I switch to our custom theme, the preview page just displays the shortcode “[mailpoet_page]”.

    I also tried to use the shortcode directly in the page template ?with <?php echo do_shortcode( ‘[mailpoet_page]’ ); ?>, but this does not work either.

    What else can I do to identify the problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Ojoma a11n

    (@geraltrivia)

    Hello there @dreamfish,

    Thank you for reaching out to us.

    I recently responded to a similar query via our support ticket system. Just incase that ticket doesn’t belong to you, here is my reply below:

    It appears you’re having an issue with how the [mailpoet_page] shortcode is rendered when you use a custom theme.
    ?
    Based on the troubleshooting you’ve carried out, it appears the functionality of the shortcode is conflicting with some functions of your custom theme.
    ?
    Can you confirm if you customized your unsubscribe page using the Gutenberg editor? If not, I’ll recommend creating the page using that editor and then trying to see if it works when viewing it from the settings page.
    ?
    Let us know if that works for you.

    Thread Starter Alex R.

    (@dreamfish)

    Hi @geraltrivia,

    I mananged to identify the problem with our theme. This specific shortcode is only working within the loop and “the_content()”. Is there any workaround without using the loop ?

    Plugin Support Tseten a11n

    (@tibetanitech)

    I’m glad to hear that you are able to find the source of the problem. Yes shortcodes by default is added in the_content() function. We are not developers but you might be able to achieve your requirements by customizing the code further with some actions and filters. I recommend checking the information in https://kb.mailpoet.com/article/274-list-of-filters-and-actions

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[mailpoet_page] Shortcode not working in custom theme’ is closed to new replies.