Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Did not work out... WordPress gave this error: "The plugin generated 460 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin." and this: notepad.cc/share/iQxQkrmeJk
a question guys. now that the ad code is placed between the conditional tag code (which is only relevant if the visitor is on a post page and not homepage)... it would only get processed on single post pages? coz the ad code is not processing on home page now.
get_the_tags() did not work for me. must have done something wrong. even if it did, it would have been pretty bad on the server because the blog in question has way too many tags and fetching each of them would have resulted in a server meltdown!
i actually added that a bit later. so anu might have missed it! this code seems to be working. i need to test it a bit more because of the extensive caching being done on the site! thanks guys!
Actually I have been using PHP codes that detect the URL for similar requirements. But WordPress tags are not detectable using the URL of the post. Hence the problem. I have added some more info in the post. Please check!