• Hi all,

    I want to create buttons linking tot internal pages with an page builder. I’m sure the url’s of the linking pages will change in the near future. Is there a way/plugin to automaticly update these buttons? Now i need to fill in a hardcoded url which won’t change. Is there a way to create links to a page ID or something like that

    • This topic was modified 4 years, 9 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • @coachview

    Sure, get the ID of the post / page and use the post_id parameter like this :
    https://your-website.com/index.php?page_id=16

    I assume you have “pretty permalinks” enabled in your site ?

    • This reply was modified 4 years, 9 months ago by corrinarusso.
    Moderator bcworkz

    (@bcworkz)

    Page output can be filtered with “the_content” filter hook. Code can search for specific links and replace any found with something else. But the code would need to know what it’s looking for and what the replacement would be, so you still end up hardcoding data unless some sort of UI is built to manage what replaces what.

    You might be better off manually doing a global search and replace of all data anytime you need to update links. The Better Search and Replace plugin will let you do so rather easily.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Update internal link automatically’ is closed to new replies.