Hello guys. I’m using the wp-subdomains found here: wordpress.org/extend/plugins/wordpress-subdomains/. which is a plugin for WordPress that allows you to setup your main categories, pages and authors as subdomains. I need to display ads based on post categories. I’ve found a method for doing so here: revolves.net/show-wordpress-ads-based-on-post-categories/.When I use the link structure: domain.com/category the ads show up, but when I turn the category to a subdomain (category.domain.com) this method does not work. I think is for the php coding. I don’t know php and want to know how to edit the displayads.php file discussed in that post to make it work for subdomains instead of categories. Any help? Thanks in advanced.
This is the code from the displayads.php file:
[php]
<?php $categories = get_the_category(); $fileName = strtolower($categories[0]->cat_name) . '.html'; $filePath = dirname(__FILE__) . '/' . $fileName; if (file_exists($filePath)) { ?>