Pass php dynamic variable to shortcode

I see a few errors in your code… on the html, there was no quotation in front of variable on the php you say you were calling the short code [modifycontent] but by your php you should have been using [mc]. All the same, here’s how I would do it: function modifycontent ($atts, $content = … Read more

Insert content of a post into another

When you use return in your function, the rest of the function will not run. It work somehow like exit(); or die();, but it won’t terminate the entire script, only ends that particular piece of code in your function, and return a value if necessary. You should save your content into a string, and then … Read more