WordPressi pistikprogramm: PostPost (uuendatud)

Värskenda: See pistikprogramm on teisaldatud minu projektide lehele ja uuendatud aadressile:

Postitus - WordPressi pistikprogramm kohandatud sisu paigutamiseks enne ja pärast oma saidi või voo igat postitust.

Komisjoni ristmiku voo reklaam

Kirjutasin selle pistikprogrammi pärast seda, kui proovisin ise oma voogu reklaami lisada ja pettunud. See on minu esimene „täielik“ pistikprogramm, kuid arvan, et see on kirjutatud väga puhtalt. Sain tõesti aru, et Plugini arhitektuur seda kasutab Lihtsate mõtete autoriõiguste pistikprogramm. Kasutasin ehitustööd Ryan Duffi oma WP kontaktivormi pistikprogramm selle konstruktiivsemaks kirjutamiseks. See on suurepärane pistikprogrammi allalaadimine ja pistikprogrammi kirjutamise õppimine, kuna see on nii lihtne.

24 Kommentaarid

  1. 1

    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!

  2. 4
    • 5

      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).


  3. 6

    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.

  4. 7

    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 :

    • 8

      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.


  5. 9
    • 10

      I’m not sure how their Poliitika leht 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 mitte generated by the script – I wonder if they have an internal control mechanism built in.

  6. 11
  7. 12

    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…

  8. 13

    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.

  9. 14

    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.

  10. 16

    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…

  11. 17

    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!

  12. 19
    • 20
      • 21

        Doug: thanks for the fast reply! So, I guess I did a poor job of asking my question. I seem to be having some issues with how PostPost works with my blog specifically with the single post display option.

        Not that it really matters, but my blog is located at:

        It looked like you and a commenter (is that a word?) were discussing this very problem back at the beginning of 2008.

        Was it a problem back then? Does the ?After Single Post on Page? work on your blog today?

        I’m more than willing to admit that I’ve screwed something up, but first I’m just checking to see if everyone else is having the same problem.

        I’ve looked at your code and it’s nice & clean, so for right now I’m blaming “is_single”.

        Andke teada, mida arvate.

  13. 22

    Tere Doug,

    I am trying to install PostPost plugin and it works great. I am putting a promotion after each post but I am having an issue. The promotion is being displayed in the categories / homepage where I have kept the more tag. The promotion appears after the READ MORE link. Is there a way we can fix that? Not show after READ MORE link??

    Tänan abi eest.


Mis sa arvad?

Sellel saidil kasutatakse rämpsposti vähendamiseks Akismetit. Vaadake, kuidas teie andmeid töödeldakse.