Support » Plugin: Jetpack by WordPress.com » recipe shortcode show up as is

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor csonnek

    (@csonnek)

    Happiness Rocketeer πŸš€

    Can you let me know what site you’re having this problem? Once I have that information, I’ll be better able to help.

    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.com/contact-support/

    Thanks!

    Plugin Contributor csonnek

    (@csonnek)

    Happiness Rocketeer πŸš€

    Upon further investigation, I discovered that while the Recipe shortcode was recently updated on WordPress.com, it hasn’t been updated in Jetpack yet. This means that
    recipe-notes, recipe-ingredients, and recipe-directions don’t exist on Jetpack yet and is why it’s not working for you.

    We’re anticipating that we can get this updated in one of our next releases, but until then you will need to use the basic recipe shortcode without those additional shortcodes.

    Marking as resolved as those shortcodes aren’t in Jetpack yet.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    To close the loop on this, you can test the shortcode improvements by applying the patch available here:
    https://github.com/Automattic/jetpack/pull/3840

    If you don’t feel comfortable editing files to apply the changes yourself, no worries! As soon as this patch is tested, it will be made available in Jetpack!

    Thanks everyone for the replies.

    Has this been updated in Jetpack yet? And, what are the “basic recipe shortcodes”?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    @omgsdfwfood Yes, the changes were included in Jetpack 4.1. You can follow the instructions here to include recipes into your posts:
    Recipes

    munich

    (@munich)

    Hi Jeremey,

    5 month later I am still having the issue discussed here.
    What is the current status with Jetpack recipe shortcodes and where are they documented?

    Here’s what they look like today with short code enabled in jetpack:

    http://dermutanderer.de/de/knusprige-gans-mac-cheese-mit-dem-aeg-procombi-plus/

    In Jetpack shortcode is enabled.

    You pointers are much welcome

    thank you,
    Mark

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    @munich The Recipe shortcode works well in Jetpack. However, looking at your post I see that additional code tags were added around the opening tag, thus breaking the whole shortcode.

    In fact, the whole recipe doesn’t seem to be part of your post content; it’s hooked to the bottom of the post content instead of being part of the post itself. Do you use a plugin to do that? If so, could you tell me more about it?

    munich

    (@munich)

    Hello Jeremy,

    I also just got a response from Jetpack support, they found the top and bottom shortcake surrounded by “…“.

    These codes are nonexistent in the wp input field.

    Which – you are right – are not part of the post input but seperate custom forms. Could that be the cause?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    are not part of the post input but seperate custom forms. Could that be the cause?

    I believe that’s indeed what’s causing the issue. To confirm that you could place a shortcode inside the post content and see if it works.

    How did you generate the custom form? Did you use a plugin like ACF? Why do you use the custom form instead of pasting the recipe inside the post content? If you created the custom form yourself, could you make sure it parses the content properly?

    munich

    (@munich)

    You are right, jetpack recipe shortcodes work like a charm as long as they are set inside the regular wp post input field.

    Now I am left with figuring out if Jetpack’s custom content types play a role in this or if it’s the advanced custom fields plugin.

    We are both sure it’s the advanced custom fields is my guess.

    Thank you

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    The recipe shortcode is a regular shortcode so it won’t conflict with any Custom Content Types on your site, regardless of how they’re created.

    I assume the problem is caused by how you’ve created the custom recipe form in the advanced custom fields plugin.

    munich

    (@munich)

    Thank you much, I look into that. Consider the issue resolved. Case closed.

    munich

    (@munich)

    One last thing

    Again your assumption was absolutely right on.

    AFC support asked me to add this snippet to function.php:

    /*————————————————————
    * Get ACF to accept Jetpack shortcodes
    *————————————————————*/

    function my_acf_format_value( $value, $post_id, $field ) {

    // run do_shortcode on all textarea values
    $value = do_shortcode($value);

    // return
    return $value;
    }

    add_filter(‘acf/format_value/type=textarea’, ‘my_acf_format_value’, 10, 3);

    Thank you again.

    Here’s the link:

    https://www.advancedcustomfields.com/resources/acfformat_value/

    munich

    (@munich)

    Conclusion:

    Advanced custom fields (ACF) with input set up as “WYSIWYG Editor” is suppoesed to work with standard wp shortcodes but doesn’t.

    Either Jetpack recipe shortcode is not standard (or requires additional php entries)

    -or-

    the advanced custom fields (ACF) plugin does not handle standard code correctly

    This is way above my head and needs to be resolved among Jetpack and ACF.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘recipe shortcode show up as is’ is closed to new replies.