Feb
18th

WordPress Plugin: PostPost (Updated)

Update: This Plugin has been moved to my Projects page and updated to:

PostPost - A WordPress Plugin to place customized content before and after each post in your site or your feed.

Commission Junction Feed Advertisement

I wrote this plugin after trying to add advertising to my feed by myself and getting frustrated. It’s my first ‘complete’ plugin but I think it’s written very cleanly. I really figured out the Plugin architecture utilizing Simple Thoughts’ Copyright Plugin. I utilized the construction of Ryan Duff’s WP Contact Form plugin to write it much more constructively. It’s an excellent plugin to download and learn how to write a plugin since it’s so simple.

RSS feed | Trackback URI

20 Comments »

Comment by no imageTony D. Clark (SezWho)
2007-02-17 14:26:58

Doug - This is awesome. I’ve been putting off writing my own in hopes of someone else doing it. I’m not running ads, but am planning on having some feed only stuff coming up. This will be perfect. Thanks!
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-17 15:44:46

Thanks Tony! I’m going to upgrade it in the next couple weeks with an Admin interface. I’m new at writing Plugins so it’s slow going.
Rate this:
2.9
 
Comment by no imageDouglas Karr (SezWho)
2007-02-18 18:47:46

Tony,

Just an FYI, I totally rewrote the plugin and have posted it again. The original was fine, but the upgrade has a full admin interface on it! I’ve reposted this post as well.

Doug

Rate this:
2.9
 
 
Comment by no imageTony D. Clark (SezWho)
2007-02-18 18:51:38

Cool. Somebody’s had a fun and productive weekend ;)
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-18 18:55:08

That it was! It was one of my goals for 2007 to write my own plugin from scratch. I’ve modified many other people’s plugins but this is the first that I took on. It’s now being used to serve my Google Ads under each post as well as my RSS Feed ads.

Fun stuff… and 2 goals down! (One of my others was to get into the Top 5,000 at Technorati… I hit that already but it was with the assistance of many “Z-List” posts, so I’ll wait for the stats to iron themselves out before I celebrate).

Cheers!
Doug

Rate this:
2.9
 
 
Comment by no imageDouglas Karr (SezWho)
2007-02-18 19:20:52

DOH! I also noticed that it showed up on the page posts… so I just modified it and released 1.1.1. I think that’s a release speed record! Now you can also customize the content before and after the page.
Rate this:
2.9
 
Comment by no imageChrisM (SezWho)
2007-02-19 14:08:32

Thanks for this, one quick thought for you though - I believe Google AdSense place a limit of 4 (5?) adverts per page, so if you add AdSense code after/before each post, and you have the option set to more than 5 posts viewed per page, there could theoretically be an issue.
Not meant as a complaint, as I don’t even use them any more (terminated my account :
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-19 17:58:09

I’m going to check on that Chris! I am trying to ‘toy’ with the idea of random, and nth placement for these. As well, I’m going to work in header and footer customization. The plugin is written quite well (I ‘borrowed’ other structures from other well-written plugins) so I’m going to continue to expand it.

Thanks!

Rate this:
2.9
 
 
Comment by no imageChrisM (SezWho)
2007-02-20 00:47:20

OK, thanks for the info, and speedy reply, appreciated.
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-02-20 08:51:35

I’m not sure how their Policy Page should be implemented. It states that there can be up to 2 ads per product. That’s interesting… example, If I have 8 posts (products) on a page with a Google Ad under each one, I don’ think I’m violating their policy.

I did see some older rules where it stated 4 per page - but those appear to be long gone. Perhaps because of situations like this. Interesting! I also notice that sometimes an ad is not generated by the script - I wonder if they have an internal control mechanism built in.

Rate this:
2.9
 
 
Comment by no imageChrisM (SezWho)
2007-02-20 13:53:45

ah OK, so I had old information in my head, thanks for the correction.
Rate this:
2.9
 
Trackback by www.ChrisMerriman.com
2007-02-23 14:47:06

Recent Plugin Additions, Chimps Go Hunting And Kazakh Crap Items For Sale…

Recently added to this blog, plugin and widget wise, is
Do Follow - Allow commenters own sites to get the juice they deserve :>
PostPost - A way of automatically adding content (in my case adverts) after your posts. (Also has a lot of other options av…

 
2007-04-06 10:57:31

[...] whether I put it before or after my tags generated through Ultimate Tag Warrior. Doug Karr’s PostPost plugin is close, but it’s a static link. Better than nothing, but I want to spread my linkback love [...]
 
Comment by no imageChris Merriman (SezWho)
2007-04-08 14:52:55

Hi, back again. Thanks for your e-mail, apologies in taking so long to respond.

One request, and two bugs.
Well the bugs may be down to my theme, I’m not sure…

1 - Would it be possible to alter the frequency of inserted adverts between posts - I feel I now have too many ads on my site :> I originally thought on the possibility of basing this on odd and even numbered posts, but I then realised that post numbers with no post attached weren’t re-used in WP. Example, you write a draft, post a few other posts, then delete the draft. Unless there is another reason for my post #s not being concurrent, you would end up with a sequence like 431,433,434 . Not sure how easy it would be to implement a POST_AD_POST_POST_AD_POST_POST sort of layout, any thoughts?

2 - (ONLY) When looking at posts via clicking on my Categories, often the ad code isn’t interpreted - this only seems to occur on short posts. As an example, if you go to my site and click on the Pictures categories, the first three posts display the code, not the output.

3 - Doesn’t appear to work when requesting adverts in the footer section.

Like I said, these issues may be down to the theme I’m using (Anaconda, check my site for a link), I was just hoping to get your input on this when you get a moment…

Rate this:
2.9
 
Comment by no imageChris Merriman (SezWho)
2007-04-12 00:13:03

I had to take down the per-post ads, as a number of readers had commented on the appearance of short posts when viewed via the category links.
If you happen to find 5/10 minutes spare, could you contact me, and I’ll happily re-insert the code, if you fancy tracing the issue.
Thanks.
Rate this:
2.9
 
Comment by no imageChris Merriman (SezWho)
2007-05-29 03:52:06

I’m guessing this post isn’t checked very often?
I tried checking the project page, but couldn’t see a comment section, so mailed you a while back.
I’m now not using ads in the same way, but wonder if other users might still find the features I mentioned above useful.
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-05-29 07:54:34

Ooops! Sorry, Chris! I missed this comment for some reason. I do have a number of improvements that I would like to make on the project, I just need to get around to them!
Rate this:
2.9
 
 
Comment by no imageChris Merriman (SezWho)
2007-05-29 11:36:05

np, glad you’ve seen the comments. Did you get the e-mail describing how on category pages, the adverts were sometimes rendered without being interpreted? Not sure if that is how you should technically phrase it, but instead of an advert, I basically saw the html for it instead…
No hurry requested on my part - I’m fiddling with other things myself right now…
Rate this:
2.9
 
Comment by no imageDouglas Karr (SezWho)
2008-01-05 15:13:22

Released PostPost 1.2.0 today! It utilizes the is_single function of WordPress so you should be able to post something before or after a single post page.

I can’t seem to get it working on my blog, though. I’m reading at WordPress support that some other folks are having problems with their template and the is_single function. It doesn’t break anything, it just doesn’t display anything.

Let me know if it works for your blog, though!

Rate this:
2.9
Comment by no imageTiberiu Florea (SezWho)
2008-03-25 06:57:04

It doesn’t (I’m using the Big Blue theme). Any chance to solve this? :)
Rate this:
1.6
 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

My Comment Policy: I moderate comments. Please be patient:

  • Spam will happily be destroyed.
  • Use your real name, not some keywords. Otherwise it will be destroyed.
  • Mean comments aren't necessary. If I don't post them I will reply personally to let you know why.
  • Lewd comments will be edited, I don't want my readers leaving because of offensive content.
Great debate, criticism and colorful commentary is always appreciated and approved!