WordPress.org

Ready to get started?Download WordPress

Forums

Simple Ads Manager
Half a fix for tags filtering (2 posts)

  1. kevin heath
    Member
    Posted 2 years ago #

    I've been having problems showing ads based on tags in one of my new sites.

    I've put together halp a fix by adapting the categories codes in this topic http://wordpress.org/support/topic/plugin-simple-ads-manager-problem-with-showing-ads-in-particular-categories?replies=6

    My adapted code is:

    $tagpost = unserialize($zone['z_tag']);
    		$tags = get_the_tags($post->ID);
            	foreach($tagpost as $key => $value)
            	{
              		if($value > 0)
              		{
              			foreach($tags as $tag)
    				{
    					$tag_name = $tag->name;
    
    					if( $key == $tag_name)
    					{
    						$id = $value;
    					}
             			}
             		}
                   	}

    This works for ensuring only ads I want showing for a tag is shown. So i'm reasonable happy. The problem I hae now is that while the ads for the tag shows ok it does not drop out of the pool for other tags. This means that ads I have for caving tags for example will show in other places unless I have specifically assigned another ad to the tag.

    Hope you understand? anyone have suggestions on how to deal with the issue?

    thanks
    Kevin

    http://wordpress.org/extend/plugins/simple-ads-manager/

  2. kevin heath
    Member
    Posted 2 years ago #

    Ok

    It looks like you are only allowed one ad filtered by tag per ad place.

    does anyone have a work around for this as I want to deliver ads according to a number of different tags.

    thanks

    Kevin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic