admin管理员组

文章数量:1134601

I have a setup where I embed some entities in my blogposts (products essentially) and then I have written a script and added to functions.php where I can all an API to get some metadata about each product.

I've successfully used plugins to insert PHP snippets but it has the same caveat as the other solutions I've found: they only allow for the same snippet to be run. What I need to figure out how to call my function with a different parameter each time and not just a once-and-for-all embed of the same call.

getMetadata(link1) 

getMetadata(link2) 

Could someone guide me towards a solution or the outlines of one?

本文标签: functionsEmbed dynamic php snippets with parameters in a blogpost