-
AuthorPosts
-
May 17, 2024 at 8:54 pm #14679[email protected]Participant
https://devppeo.wpenginepowered.com/?s=basil
Shortcodes not expanding for products in site search. This happens on all themes (MasterStudy is our normal theme, Twenty-Twenty is currently active on the site), this implies that the problem is not theme related. When you click on the product in the search results, the shortcode is expanded.
Right now, our site has almost all plugins deactivated.
I can provide a password reset link privately for admin access to the site.
May 17, 2024 at 11:19 pm #14680Aakash ChakravarthyKeymasterHi pptech,
Shortcodes are executed by WordPress themes on the specific area as required.
Looks like the area you have mentioned is not executed for shortcodes.
This applies to any shortcode.
Can you please add a different shortcode like[gallery]
and see if it executes?I tried inserting shortcodes in content in “twenty-twenty” theme and it got executed. The child theme which you developed seems to be missing that.
Please confirm the same as requested above. I’ll suggest next steps as per that.
Thanks,
AakashMay 18, 2024 at 1:30 am #14681[email protected]ParticipantThank you for the quick response!
For the purpose of this example, the theme is twenty-twenty. I am not running a child theme.
I followed your instructions and changed the shortcode in the WooCommerce PRODUCT short description to [gallery]. It also did not expand. This tends to imply that shortcodes are not expanded in site search results for products. So the MasterStudy theme would not expand it either.
What things could be done? Does this require custom work? I have some familiarity with PHP, I just don’t know which module to look at to make a change. I would any alternatives you could suggest.
May 18, 2024 at 3:24 pm #14682Aakash ChakravarthyKeymasterHi,
One way to execute the shortcode is analyze the theme and execute the shortcode where the description is printed.
Other way would be to look for functions like below.
https://wordpress.stackexchange.com/questions/367511/adding-shortcode-to-product-short-descriptionCan you please paste the code as in the link above in theme functions.php file and see if it works?
Thanks,
Aakash -
AuthorPosts
- You must be logged in to reply to this topic.