WordPress JavaScript Plugin for Posts




The Adsense-Deluxe WordPress plugin can do more than simply help you add Adsense ads to your WordPress blog posts. It’s also great for including JavaScript code or most any other text you want to insert when a post is viewed.

When I first wrote Adsense-Deluxe, I just wanted a more efficient method of including a variety of Adsense ads in my posts and templates, and a way to easily change those over time, or disable them. But Adsense-Deluxe is essentially just a search/replace filter for posts, which means you can just as easily include Yahoo Publisher Network (YPN) ads, or Clicksor Contextual Advertising or any other advertising code the same way Adsense is configured.

Today one of the many satisfied Adsense-Deluxe users (Michael B. at http://www.MarketItOnline.co.nz wrote about his frustrations in finding a way to include JavaScript in his posts since WordPress adds <br> html formatting to each line of the JavaScript code. He asked if I had any ideas or knew of a plugin which would do this. While I suspect there may be some WordPress plugins in the “programmer tools” categories which could accomplish this, I suggested he just make the Adsense-Deluxe plugin perform that task. Afterall, Adsense ad code is nothing more than JavaScript, so instead of advertising JavaScript, you can use any other JavaScript you want for per-post inclusion.

[ You can checkout Michael’s Body Mass Index Calculator JavaScript within a WordPress post. ]

2 Responses to “WordPress JavaScript Plugin for Posts”

  1. t2dman Says:

    he he. Now we have some dialogue, how about some better seo of this page.

    The http://guff.szub.net/2005/09/01/head-meta-description plugin is great for adding default meta descriptions that are relevant to your pages. Then I personally add the custom field “description” for pages that I want especially well optimized. My formula is to repeat the search phrase twice within 156 characters (google), and use a sales pitch sounding phrase so that you get good clickability.

    When I was searching for this topic, I searched for “Wordpress Javascript” - so I consider that the title should be “Wordpress Javascript Plugin” so that you at least have those words “Wordpress Javascript” next to each other. And then repeat that phrase a twice in the opening paragraph and scattered around the rest of the text of the page.

    Then I suggest that instead of an <h2> you use an <h1> - wont be much difference, but might as well give the title that bit more emphasis for Google.

  2. wayne Says:

    Before head-meta plugin existed I made some modifications to Jerome’s Keywords plugin (see this post http://www.acmetech.com/blog/2005/10/06/wordpress-seo-page-titles-and-meta-tags/) to make it include a Description meta tag as well. And that post also mentions the Optimal Title plugin which I highly recommend for better display in Search engine results.

    I’ve been including my own header-stuff.php file in my template headers which uses a default blog meta description for home page, in some cases modifies the meta desc for search result pages, otehrwise it uses the post excerpt for the desc (which I make sure I always fill in so a default one isn’t generated).

Leave a Reply

You must be logged in to post a comment.