• HI!

    Looking to do a replace text on my site. In particular for internal links.

    Trying to avoid plugins ( for a multitude of reasons!) and I’m looking for a neat way to do this with code.

    In particular it will be replacing words with links. For example any copy on the site that says “lorem ipsum men’s bags lorem ipsum” – will become “lorem ipsum men’s bags lorem ipsum”… Hope this makes sense!

    Good idea? Bad idea? I’m certain it can be done cleanly and efficiently without the bloat of plugins and any useful features being behind a paywall ??

    As always, indebted to your kindness, help, advice and support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    There is a plugin for that, “better search replace“. If you prefer to run it as a script external to WordPress, you could use wp-cli (if installed on your host) or https://interconnectit.com/search-and-replace-for-wordpress-databases/

    Just FYI, “bloat” is in the eye of the beholder. Typically, you’d uninstall this plugin after use.

    Thread Starter itsmefti

    (@itsmefti)

    thanks!

    yes I’ve had look at better search and replace. I’m unsure about the “real time replace”… Replaces before loading on viewers side… Does this get picked up by search engines the same as a “hard” replace?

    if the real time replace has the same impact for SEO and search engine purposes great! I’ll explore further!

    thanks again, really appreciate it ??

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