- This topic has 9 replies, 2 voices, and was last updated 4 years, 7 months ago by
David.
-
AuthorPosts
-
June 30, 2021 at 6:00 am #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
June 30, 2021 at 6:51 am #1839682David
StaffCustomer SupportHi there,
how are you adding the shortcodes in the editor ? Are you using the Shortcode Block ?
June 30, 2021 at 7:38 am #1839748Carlo
yes
June 30, 2021 at 7:46 am #1839765David
StaffCustomer SupportNot 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.
June 30, 2021 at 7:51 am #1839931Carlo
Just tried.
Same issue unfortunatelyJune 30, 2021 at 8:42 am #1839980David
StaffCustomer SupportAre those arguments required in the Shortcode ? Could they be included in the WPSP list settings ?
June 30, 2021 at 9:15 am #1840016Carlo
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?June 30, 2021 at 1:06 pm #1840249David
StaffCustomer SupportThe only option i can think is to create your own shortcode that passes your arguments to the
wpsp_displayfunction.
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
July 1, 2021 at 3:55 am #1840775Carlo
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
July 1, 2021 at 4:04 am #1840795David
StaffCustomer SupportThanks – we’ll get onto that ASAP.
-
AuthorPosts
- You must be logged in to reply to this topic.