php – how to redirekt outgoing links first to my own website

Question

How can redirect outgoing links first to my own site?
for example i got a recipe post and i got a outgoing link to another website
this link is stored in a metafield

$recipe_url = "https://recipes.com/applepie";

but in the post i dont want to href recipes.com i want
my own link like:

$displayed_url = "https://myownsite.com/redirect/recipe/123";

does someone know how to archive this in wordpress?

0
DougPilatus 2 years 2022-05-11T14:35:33-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse