Find & replace help

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #105660
    Barna
    Guest

    Hello,

    Is there a way to make find/replace only trigger on exact full string match while doing multiple cases? My issue arises when trying to find and replace values that contain each other, like – find=”x,xy,xyz” replace=”1,2,3″ – output ends up being 1, 1y, 1yz instead of 1,2,3.

    Regards

    • This topic was modified 1 year, 4 months ago by Omar Dabbas.
    #105661
    Tom Anbinder
    Moderator
    Plugin Support

    Hi,

    Could you please try changing the order of your values by listing longer ones first, i.e.:

    find="xyz,xy,x" replace="3,2,1"
    #105662
    Barna
    Guest

    Thank you, that worked.

    #105663
    Barna
    Guest

    Also, is there a way to get the result of multiple shortcodes inside one CDATA tag?

    #105664
    Tom Anbinder
    Moderator
    Plugin Support

    Yes, you can put it inside one CDATA tag.

    To do that, instead of adding cdata="yes" attribute to the shortcodes, like you would normally do:

    [alg_product_name cdata="yes"]
    [alg_product_short_description cdata="yes"]

    you will have to use the “ugly” form:

    <![CDATA[ [alg_product_name] [alg_product_short_description] ]]>

    i.e. wrap it in <![CDATA[ ]]>

    Hope that helps. And if you like the plugin, please consider leaving me a rating.

    #105665
    Barna
    Guest

    Thank you, it sure did. I didnt realise I’d have to substitute &lt to [. Tried it with [ but that killed the shortcodes.

    #105666
    Tom Anbinder
    Moderator
    Plugin Support

    Yes, we need to substitute, because it seems that shortcodes are not allowed inside HTML tags in WordPress.

    Anyway, glad it helped 🙂

    #105667
    Barna
    Guest

    Hello, is there a way to put a hard cap on the number of products in the feed?

    #105668
    Tom Anbinder
    Moderator
    Plugin Support

    Hi,

    Unfortunately no, at the moment there is no hard cap on number of products, but I will try to add this option in the next plugin version.

    #105669
    Tom Anbinder
    Moderator
    Plugin Support

    Hi,

    As promised, we’ve released new plugin version 1.7.1 today, where I’ve added “Total products” option to “Products Filtering Options” section in plugin settings. This should solve the task, i.e. adding hard cap on number of products in feed.

    Please let me know if you have any questions. And if you like the plugin, please consider leaving me a rating.

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