• Resolved nathalie75

    (@nathalie75)


    Hi,

    in your shortcode documentation https://pods.io/docs/learn/shortcodes/pods/ you write:
    Display a field from the current post
    [pods field=”my_custom_field”]
    [pods]{@my_custom_field}[/pods]

    I used that to display fields and taxonomies and it used to word fine. Today after updating to 2.7.23, it didn’t work any longer. I realised why:
    I didn’t understand that these were 2 shortcode possibilites (“[pods field=”my_custom_field”]” or “[pods]{@my_custom_field}[/pods]”) and I always used both of them – which doesn’t work any longer: when using both of theme, none of them works… It’s a pity. Now I have to update the shortcodes on a lot of pages. Maybe you should add a notice in your documentation: you can choose ONE of these shortcodes..

    Thanks for you great plugin.

    Nathalie

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    This actually isn’t a Pods issue but a shortcode limitation.

    [pods field=”my_custom_field”]
    [pods]{@my_custom_field}[/pods]

    This order won’t work since WordPress shortcode parser recognizes the ending [/pods] as the end for the first shortcode instead of the second.

    [pods]{@my_custom_field}[/pods]
    [pods field=”my_custom_field”]

    Reversing the order like above would actually work since you are closing the first shortcode before opening a new one.
    However, The second shortcode is a bit redundant.

    In this case I advice to use the parameter instead of the shortcode content since it’s faster: [pods field=”my_custom_field”]

    Cheers, Jory

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    This is correct, if you need to mix and match one-line shortcodes with open/closing shortcodes, you need to close all of those one-line shortcodes for that syntax to parse correctly with WordPress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem displaying CPT fields and taxonomy with 2.7.23’ is closed to new replies.