Hi, I'm looking all over the forums and tutorials and not able to finda good explanation of inline ads or how to set them up to have an ad appear at the end of each post in the RSS feed only.
Is there something with photos that show how to set this up, what the ad will look like, where it will appear? I've seen the admin demo. It doesn't show anything.
I'd hate to have to use another plugin, just to get something into the RSS feed.
Thanks.
UPDATE: checkout the "addons" Wordpress plugin to get this functionality.
The use of ads in RSS Feeds hasn't been one I've explored much. Whilst there is an option in the "inline ads" section to show that ad type in the RSS Feed, it doesn't offer much in the way of flexibility.
Inline ads are dealt with entirely automatically (they are placed in the post using the Wordpress "content" filter), so there's no setup required beyond what's on the admin settings page. You can test it out by configuring the admin options then placing a default ad to see how it appears within blog posts.
You can still use OIO to manage ads in the RSS Feed (eg. creating a specific banner ad zone for it), but you'd need to create a small plugin to insert the ad zone into the RSS Feed in the manner you'd like.
Below is a very simple example of how to insert a banner zone (ID #1) on to the end of the RSS Feed.
/*
Plugin Name: OIO RSS Feed
Description: Add an ad zone to the RSS Feed
Version: 1.00
*/
//OIO ad code goes within this function
function oiopub_feed_wrapper($content) {
$zone_id = 1;
if(is_feed() && function_exists('oiopub_banner_zone')) {
$content .= oiopub_banner_zone($zone_id, 'center', '', 1);
}
return $content;
}
//add to feed
add_filter('the_content', 'oiopub_feed_wrapper');
thanks, I was trying to avoid a plugin, but if this is the only way, I'll give it a try. This would be a great feature to add. It really entices advertisers to be able to have a listing in both places since many don't go to the site, only view the feed.
thanks!
Ok, How can I make sure it's showing up correctly. I've activated the plugin (changed it to a Zone 3) created and enabled a Zone 3 and put in a default image and a default html ad.
I've subscribed to the feed to see if it shows up and I've yet to see anything. Is there a way I can tell what's going on or if it will show up. very important for an ad deal I'm working! thanks!!
Could you link to the feed itself?
Links: Tutorials | Troubleshooting | Bug TrackerSure, here it is
http://feedproxy.google.com/solidsmack
There are also some google ads down there being added by feedburner.
I just tested out the plugin I wrote above, and I think I might have used is_feed() in the wrong place - it should be inside the content filter function.
I've updated the code above to correct it.
EDIT: it's also worth noting that Wordpress RSS Feeds can't have css stylesheets inserted into them as far as I'm aware, so sticking to just one ad slot in the zone would probably yield best results (although multiple ads can be rotated).
Links: Tutorials | Troubleshooting | Bug TrackerOk Simon, thanks! I've got it working now with the code you provided above. Also a not to anyone else not familiar with php, you'll need to add opening/closing php.
Here's what mine looked like in the end for a position 3 banner ad shown only at the end of each post in the feed.
<?php
/*
Plugin Name: OIO RSS Feed
Description: Add an ad zone to the RSS Feed
Version: 1.00
*/
//OIO ad code (php)
function oiopub_feed_php($content) {
$zone_id = 3;
if(is_feed() && function_exists('oiopub_banner_zone')) {
$content .= oiopub_banner_zone($zone_id, 'center', '', 1);
}
return $content;
}
//OIO ad code (js)
function oiopub_feed_js($content) {
global $oiopub_set;
$zone_id = 3;
if(is_feed()) {
$content .= '<script type="text/javascript" src="' . $oiopub_set->plugin_url . '/js.php?type=banner&zone=' . $zone_id . '"></script>';
}
return $content;
}
//add to feed (using php in this example)
add_filter('the_content', 'oiopub_feed_php');
?>
Simon, hi. After installing V2.20 I'm not seeing the ad at the bottom of the feed any longer. Has something changed or is there a new way to add a RSS feed ad?
Thanks, Josh
Hmmm no there shouldn't be anything different that would affect it.
An obvious question I know, but is the plugin definitely active? Also, is banner ad zone 3 "enabled" in the settings? (just in case something got scrambled somehow during the upgrade, although it shouldn't have)
Links: Tutorials | Troubleshooting | Bug TrackerHi simon. yes, it's enabled and the plugin is active... it is a Flash ad. would that have anything to do with it?
I just checked the feed again, and I can see an ad under each post in the feed now. Did you manage to sort it out, or is there still a problem with flash?
Links: Tutorials | Troubleshooting | Bug TrackerSimon, sorry about the delay in getting back to you. It seems to be a problem with the Flash banner. I saved a .jpg of the banner and uploaded it. So, now it's showing.
It would be nice to have flash support there as well, if possible, but for now I can live with this. If however there's a quick fix, let me know!
I was also wondering if there is anyway to modify the output. A bullet shows up right before the ad. Looks a bit odd. ideas?
Thanks again Simon. Your support is great!!
Oh, btw, the stat tracker doesn't seem to be picking up the clicks from the RSS banner ad either.
I'm surprised flash doesn't work there, do flash banners display properly on non-feed pages?
EDIT: I've just updated the "include/output.php" file very slightly to use a <div> instead of <ul> if there is only one ad slot in a zone (previously it wasn't doing it in all cases, so that should solve the bullet point problem).
--------
The stats is something I hadn't taken into account initially. What would need to be done depends on what you want to do:
(1) You want to record clicks and impressions. This isn't possible unless switching the custom plugin to use javascript output instead of php. The php function uses the Wordpress footer to do a single INSERT query once all the ads have been displayed on a page, but that wouldn't work for feeds since they are cached by feedburner.
I've updated the plugin code above to give an example of using javascript output. Bear in mind that this is more resource intensive for the server, since every line of javascript would require a fresh load of the plugin.
(2) You just want to record clicks. As mentioned in #1, impressions can't be recorded when using php output in feeds. This has a knock-on effect on clicks in this case is because the system checks to see if there are any impressions first before archiving data for that ad (the reasoning being that there must be an impression to be a click, but not in this case!).
I can alter the tracker module code if needed so that clicks and impressions are archived independently, but the impressions column would not increase.
Links: Tutorials | Troubleshooting | Bug TrackerOK, I'm not exactly sure what I need to do on my end. Do I need to download the oiopublisher zip and replace the output.php file?
On the stats, getting the clicks is the most important to the advertiser, so I'd want to do it that way.
btw. I also have an adsense block in the feed. How does Google do it? When I look at the adsense results I see impressions and clicks. I just wanted to mention that in case it could help work backwards on something for OIO.
btw2. I'm thinking feed type ads and 'embeddable' ads are gonna start being more in demand. Especially with sites like twitter, friendfeed, tumblr and posterous and Google Reader Followers. I'd be interested in being able to embed something into my twitter/freindfeed/posterous posts. something with the same features as OIO!
Thanks Simon!!
If you replace the include/output.php file, that *should* remove the bullet point in the feed (if not, let me know).
Google records stats it in the same way OIO does when using javascript - think of it as being an independent system from the feed itself. The php output that works well with Wordpress the majority of the time isn't as suited, because it relies on the php code being executed every time the feed loads. When a feed is cached by an external site like feedburner, that can't happen.
You might want to try using the javascript output in the feed plugin and seeing how that goes for you.
Links: Tutorials | Troubleshooting | Bug TrackerOk, it's been awhile (apologies) but I did replace the output file and the bullet is gone. (Thanks!)
How would I go about using the javascript in the feed plugin? I tried just replacing the function with the javascript. should that work?
Thanks once again Simon!
For some reason I edited your post instead of mine when giving a javascript example for the RSS plugin. It's here though:
Links: Tutorials | Troubleshooting | Bug TrackerI try to avoid buying plugins myself and make them too but sometimes thats just stupid especially when there are plugins like this.
I think everything is covered. Some improvements could be made but then thats a fact with everything in the world so don't let it put you off.
I'm using it to sell space on www.webtechglobal.co.uk
Thanks
Ryan