str_replace (find this, replace with this, in this)
You said "$adv_portal_rotating_articles - is the template I have created and would like to insert within $adv_portal". But, your find/replace statement says you are finding and replacing something in $adv_portal_rotating_articles and assigning it the new value of $adv_portal. That doesn't seem to be what you said you wanted. Seems to me you want it to be:
PHP Code:
$adv_portal = str_replace($find, $replace . $find, $adv_portal);
(I'm just commenting on that one line, not the whole thing.)