Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • [email protected]
    Participant

    pptech shortcode not expanding

    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.

    Hi 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,
    Aakash

    [email protected]
    Participant

    Thank 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.

    Hi,

    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-description

    Can you please paste the code as in the link above in theme functions.php file and see if it works?

    Thanks,
    Aakash

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

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter