WordPress - mass editing images

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
Colmike7
Banned
Banned
Posts: 1670
Joined: May 23rd, 2018, 12:21 pm
Title: (>^-^)b

#16

Post by Colmike7 » April 19th, 2021, 6:33 pm

HeidiHoe wrote: ↑
April 19th, 2021, 6:00 pm
Colmike7 wrote: ↑
April 19th, 2021, 1:32 pm
vblogger wrote: ↑
April 16th, 2021, 11:09 am
I have never come across this one let me think if I come up with a solution I'll be back to post it
A plugin won't do it.

When someone makes the theme, there are parts where it takes in the post data from the DB. That php is where you'll want to put the centering code and might be different depending on the theme. It will also need to be coded everywhere where the post image/content needs to be centered. Ex: single.php, archive.php, etc.
Just thinking out loud here but...
Would adding alignment style to img marked !important to the inline style from within customize theme area make a difference?
I was wondering similar, where maybe a plugin can just assign aligncenter to the post images' CSS, with or without the text being centered, too.

There are a couple of ways that I thought of that would work, too, but they're annoying so I'm going to pretend that I don't know. :p




Colmike7
Banned
Banned
Posts: 1670
Joined: May 23rd, 2018, 12:21 pm
Title: (>^-^)b

#17

Post by Colmike7 » April 19th, 2021, 6:34 pm

HeidiHoe wrote: ↑
April 19th, 2021, 6:30 pm
fetishnews wrote: ↑
April 19th, 2021, 1:25 pm
Asked for this last year, no one had a plugin for me.
https://wordpress.org/plugins/search-and-replace/

https://wordpress.org/plugins/real-time ... d-replace/

1st plugin makes changes in database so create a backup 1st just in case. 2nd plugin makes changes in real time only and does not alter database. I've checked out the second and it seems to get the job done. I've used the 1st to change external URLs from http to https and couldn't have been more pleased. It's real easy to use and it's quick. I suppose you could do a search for <img src and replace it with <img style="text-align:center" src. Or replace with <div style="text-align:center"><img src and do a search to find the end to add the </div>. The search where to place the close tag could be a little tricky, look at your source code to see what's unique to the end of the img tag.
What about images that aren't in posts?




User avatar
HeidiHoe
Verified Member
Verified Member
Posts: 1653
Joined: February 3rd, 2018, 12:20 pm
Title: Resident Genius

#18

Post by HeidiHoe » April 19th, 2021, 6:43 pm

Colmike7 wrote: ↑
April 19th, 2021, 6:34 pm
HeidiHoe wrote: ↑
April 19th, 2021, 6:30 pm
fetishnews wrote: ↑
April 19th, 2021, 1:25 pm
Asked for this last year, no one had a plugin for me.
https://wordpress.org/plugins/search-and-replace/

https://wordpress.org/plugins/real-time ... d-replace/

1st plugin makes changes in database so create a backup 1st just in case. 2nd plugin makes changes in real time only and does not alter database. I've checked out the second and it seems to get the job done. I've used the 1st to change external URLs from http to https and couldn't have been more pleased. It's real easy to use and it's quick. I suppose you could do a search for <img src and replace it with <img style="text-align:center" src. Or replace with <div style="text-align:center"><img src and do a search to find the end to add the </div>. The search where to place the close tag could be a little tricky, look at your source code to see what's unique to the end of the img tag.
What about images that aren't in posts?
Search & replace plugin let's you search just within the posts
The Fourth Turning Is Here

Colmike7
Banned
Banned
Posts: 1670
Joined: May 23rd, 2018, 12:21 pm
Title: (>^-^)b

#19

Post by Colmike7 » April 19th, 2021, 6:49 pm

HeidiHoe wrote: ↑
April 19th, 2021, 6:43 pm
Colmike7 wrote: ↑
April 19th, 2021, 6:34 pm
HeidiHoe wrote: ↑
April 19th, 2021, 6:30 pm


https://wordpress.org/plugins/search-and-replace/

https://wordpress.org/plugins/real-time ... d-replace/

1st plugin makes changes in database so create a backup 1st just in case. 2nd plugin makes changes in real time only and does not alter database. I've checked out the second and it seems to get the job done. I've used the 1st to change external URLs from http to https and couldn't have been more pleased. It's real easy to use and it's quick. I suppose you could do a search for <img src and replace it with <img style="text-align:center" src. Or replace with <div style="text-align:center"><img src and do a search to find the end to add the </div>. The search where to place the close tag could be a little tricky, look at your source code to see what's unique to the end of the img tag.
What about images that aren't in posts?
Search & replace plugin let's you search just within the posts
Ah cool, I should have looked :p




deviantz
Verified Member
Verified Member
Posts: 877
Joined: March 11th, 2018, 1:47 pm

#20

Post by deviantz » April 21st, 2021, 7:10 am

HeidiHoe wrote: ↑
April 19th, 2021, 6:00 pm

Just thinking out loud here but...
Would adding alignment style to img marked !important to the inline style from within customize theme area make a difference?
If seems the simple solution to add a couple of lines of code to the additional css. But I am not good with code or else.......




WordPress - mass editing images

Post Reply