[Support request] & turning into & amp ; in shortocodes

Home Forums Support [Support request] & turning into & amp ; in shortocodes

Home Forums Support & turning into & amp ; in shortocodes

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1839637
    Carlo

    Hi there,

    I have got this issue when inserting shortcodes.

    For example:
    let’s take this one
    [wp_show_posts id=”10150″ settings=”meta_key=id_number&orderby=meta_value&order=ASC”]

    After saving the page, the shortcode is working.

    But If I go back to edit the same page, the shortcode is turned into this one:
    [wp_show_posts id=”10150″ settings=”meta_key=id_number& amp ;orderby=meta_value& amp ;order=ASC”]

    As you can see & is changed to & amp ; (I had to add blank spaces otherwise I could not make this appear in this message 🙂 )

    And if the page is saved again, the shortcode does not work anymore.

    Is there some solution to fix this? (maybe some snippet to put in functions.php?

    Thank you. All the best. Carlo

    #1839682
    David
    Staff
    Customer Support

    Hi there,

    how are you adding the shortcodes in the editor ? Are you using the Shortcode Block ?

    #1839748
    Carlo

    yes

    #1839765
    David
    Staff
    Customer Support

    Not come across this before but it looks like a bug in Gutenberg:

    https://github.com/WordPress/gutenberg/issues/26362

    Try adding the shortcode using a HTML block instead.

    #1839931
    Carlo

    Just tried.
    Same issue unfortunately

    #1839980
    David
    Staff
    Customer Support

    Are those arguments required in the Shortcode ? Could they be included in the WPSP list settings ?

    #1840016
    Carlo

    I can consider to create multiple lists with a different filter each.

    As you can see, the key is a custom field (created in ACF)
    is it possible?

    #1840249
    David
    Staff
    Customer Support

    The only option i can think is to create your own shortcode that passes your arguments to the wpsp_display function.
    Here’s an example of that being done here:

    https://wpshowposts.com/support/topic/category-specific-side-bar/#post-31332

    If you need help with that – it would be worth raising a topic on the WPSP forum

    #1840775
    Carlo

    Hi David,

    thank you for your support. I hav just raised a topic on the WPSP forum.

    This is the link: https://wpshowposts.com/support/topic/snippet-to-convert-a-shortcode/

    Thank you. Have a nice day. Carlo

    #1840795
    David
    Staff
    Customer Support

    Thanks – we’ll get onto that ASAP.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.