Support » Plugin: Import any XML or CSV File to WordPress » Remove everything AFTER specific character

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @braymaddox

    I need a php function to remove the ? and everything after it in the URL. The final URL should be http://www.snowys.com.au/polypro-active-thermal-top

    Here’s an example function for this:

    [substr({url[1]},0,strpos({url[1]},"?"))]

    Just replace {url[1]} with your actual import element.

    Plugin Author WP All Import

    (@wpallimport)

    Hi @braymaddox,

    I am going to mark this as resolved since we haven’t heard back. Feel free to follow up in this thread if you still have questions.

    Anyone else, please open a new topic.

    braymaddox

    (@braymaddox)

    Thank you for posting this possible solution. It works provided that all the imported data has a ? in the related URL but it doesn’t seem to work if there are a mixture of URL formats. Thanks all the same

    • This reply was modified 2 weeks ago by braymaddox.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.