wp_get_attachment_links do not modify output for attachment links

There has been a misunderstanding of how page content works here:

but this code not modified links in page content. What is wrong with this code?

Once the links are saved in the post content you have to reopen the post and resave/reinsert for new code to take effect. Filters only modify the links when they are created, they can’t change already saved post content.

What About Widgets/Blocks/Shortcodes?

Places such as shortcodes or server rendered blocks will immediatley update as they create new fresh HTML when viewed, but anything that stored those values in the database/post meta/post content will need to be manually updated.

Is There a Different Filter For This?

No, that’s not how this works, you would still need to open those pages in the admin to change the links.

So What Should I Do?

You have several options:

  • Find all the places that have your old custom HTML via search, edit and reinsert the links then save
  • when you reinsert the links consider using a block or shortcode instead so that you don’t have to do this again in the future
  • if you are using a page builder you should ask in their communities as they can use different methods that require unique answers specific to that page builder

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino