• When I input normal text in woocommerce product short description, it works fine. It’s indexed and searchable by relevanssi.

    But when I input shortcode created by shortcode plugin, it doesn’t work.
    It seems that “Expand shortcodes in post content” doesn’t work here.

    For normal product content nad posts it works fine. I put shortcode there, and relevanssi expand and index shortode content. It’s searchable.

    Is it possible to resolve this?

    https://www.ads-software.com/plugins/relevanssi/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari

    (@msaari)

    If “Expand shortcodes” doesn’t work, it means those shortcodes are not compatible with Relevanssi – it may be they don’t return any content at all when Relevanssi is trying to expand them. That happens, sometimes.

    Fixing this… well, maybe. It might be possible, but it requires programming. How well do you know PHP?

    Thread Starter zis1

    (@zis1)

    Hi,
    But it works fine for all other places, when I put same shortcode in product main text, pages or posts…

    P.S.
    I’m not so good for PHP

    Plugin Author Mikko Saari

    (@msaari)

    Ok, in that case the problem is that Relevanssi doesn’t expand shortcodes in the Woocommerce short description. That is probably stored in a custom field; if that’s the case, then it wouldn’t be terribly difficult to fix.

    Thread Starter zis1

    (@zis1)

    Hi,
    I use Enfold theme for Woocommerce…

    Plugin Author Mikko Saari

    (@msaari)

    This is something a WP developer can fix for you. It requires a bit of custom programming and goes beyond the help I can give here, but the key is to use the relevanssi_content_to_index filter hook to add extra content to the posts before they are indexed. In the filter function, you need to read in the custom field that has the short product description, expand the shortcode and return the result to Relevanssi.

    If you’re not particularly good with the PHP side of WP, that probably sounds like gibberish, but tell that to a WP developer, and they should be able to fix this for you.

    (Or buy a Relevanssi Premium license and send a support request.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode in woocommerce short description’ is closed to new replies.