PHP/SQL noob here. Based on this question I attempted to change some entries in phpmyadmin for my wordpress blog: I want to all galleries to link to file instead to file attachment (add link="file"
to [gallery]
shortcode). For that I used 'gallery type="rectangular"'
as a search pattern.
However, my attempt (below) is not working. For some posts, I also tried to manually edit the table entries in the database, with no effect either. Yet, when I change something in my wordpress interface, the effect becomes visible immediately both on my homepage and in the database. What I am missing here? Is this even a good idea, and if not, are there alternatives?
UPDATE
mydb.wor9400_posts
SET
post_content =
REPLACE
(
post_content,
'gallery type="rectangular"',
'gallery type="rectangular" link="file"'
)
WHERE
post_content LIKE '%gallery type="rectangular"%'
shortcode_atts_gallery
filter? – birgire Apr 15 '19 at 16:56