Grandi: Hey guys, I have multiple pages prolly like 30-40 on my site that contain this code:
Vester: A href=”#”img src=”/wp-content/uploads/order.png” alt=”Order Now”/a
Fera: Is there a way to update them all at once?
Kaiserman: Bu***and: how the heck can I rewrite my slugs based on language on my custom post types?
Mathis: ElectriX: find/replace grep
Kettmann: ElectriX: ie: use SSH / terminal locally
Samaha: How the heck can I rewrite my slugs based on language on my custom post types?
Winward: AbuDhar: https://codex.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/Rewrite_API
Moquin: Kenshino__: I was accidentally asking him.
Gannetti: AbuDhar: https://codex.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/Function_Reference/_2
Schomburg: AbuDhar: https://codex.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/Function_Reference/_2
Solinger: So I had to ask generally instead.
Sterkenburg: It was not because of copying.
Junius: Bu***and: How would I find/replace it? Wouldn’t it have to be done via the db
Krinov: And will this work with Polylang Kenshino__?
Sauer: ElectriX: you said that code is on your site. I ***umed you meant it’s in the theme source.
Budesa: Nope, it’s within wp_posts
Briede: ElectriX: how is that link generated? How do you want to change it?
Piacente: ElectriX: that answer doesn’t make sense
Auton: It’s content within a page
Pitorak: ElectriX: ok so its inside of the content of a post manually added?
Zieger: And how do you want to udpate it?
Linderholm: Basically just want to do
Turneer: A href=”/contact-us/”img src=”/wp-content/uploads/contact.png” alt=”Contact us today!”/a
Corbitt: ElectriX: this is why data architecture is important ; . you wouldn’t have to go through this mess
Shingledecker: You can just change the wording and target of a single setting
Beder: It’s no different then find/replacing it even if I were to just replace 1 letter
Zaeske: ElectriX: ***uming the person who put that code in manually didn’t have any typos or changes in spaces, punctuation, or capitalization
Bewley: Does translated function work with Polylang?
Reagans: I put it in and it’s been copied on all the product pages across the site
Hieber: ElectriX: in that case just use the Search2Replace Db app and do a find/replace there
Nicoletti: ElectriX: Google result for Search2Replace DB – wordpress-databases/">https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Boes: ElectriX: that said, I would consider simply removing it and turning it into a setting you can easily change across the board.
Mayse: ElectriX: to avoid this happening again
Sharrai: ElectriX: if you find yourself constantly copying/pasting elements EXACTLY then you should consider how they can be turned into something that is configurable from one location
Oberbeck: ElectriX: so you can do something like make a settings field or a post meta field
Jenista: Yeah, wasn’t thinking ahead when I did it
Balicki: ElectriX: well here is your chance to redo it. like i said
Dymek: Instead of replacing it with another piece of code that isnt configurable. remove it entirely and make a setting field or some sort
Gaetz: It’ll probably end up staying this way since they don’t take orders online. I get where you’re coming from, but if I have to update each page manually anyways, might as well just do it like that
Randol: ElectriX: you can literally deleted it and just put one piece of code in the_content filter to add it bad
Lossius: ElectriX: your client uses lightspeed ?
Scalzo: Nginx is 100 times better than apache
Burnie: Well it’s on my dev server that uses litespeed, they use godaddy LOL