Shantz WordPress Prefix Suffix

Shantz WP Prefix Suffix

== Description ==

Shantz WP Prefix Suffix is a light-weight and easy to use plugin which allows you to add any text and/or HTML/CSS code to your posts and/or pages as prefix (top / beginning), middle and/or suffix (bottom /end). (That includes even any new or old posts and pages and even your feed)
Examples of use cases could be to include your copyright message, advertisements (like adsense, etc), permalinks, your other site links, any other custom messages. This works very fine with ads as you don’t have to manipulate your posts or templates to add the ad code, shantz-wp-prefix-suffix will do that for you automatically for all posts and you also get basic controls whether to “display” the ad or not (on home pages, excerpts, etc).

Features:

  • Add Prefix to all your posts automatically.
  • Add Prefix to all your pages automatically.
  • Add Suffix to all your posts automatically.
  • Add Suffix to all your pages automatically.
  • You can control the number of paragraphs/words after which your code/text should be added while using the “middle” option.
  • Prefix/Suffix can be plain text, HTML, CSS, PHP, javascript etc.
  • Optionally display/not display on home page/excerpts etc.
  • Control plugin order for fine control over where your code/text is displayed.

Download: http://wordpress.org/extend/plugins/shantz-wp-prefix-suffix/

== Installation ==

The shantz-wp-prefix-suffix plugin can be installed in following easy steps:

1. Unzip “shantz-wp-prefix-suffix” archive and put all files into your “plugins” folder (/wp-content/plugins/). It is advisable to create a sub directory into the plugins folder, like /wp-content/plugins/shantz-wp-prefix-suffix/

2. Activate the plugin

3. Go to Options > Shantz WP Prefix Suffix, adjust your settings and save them.

== Frequently Asked Questions ==

= How do I add My copyright message and post permalink so as to protect myself against RSS feed scrapers =
Add the following code to “Suffix text box” and check the “enable php input” option (without the “pre” and “code” tags. I put them there for the wordpress readme parser):

Β© <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | <a href="<?php echo get_permalink();?>"><?php the_title();?></a>

= How do I use this for Adsense =
You can either paste your javascript code in the text box and ads will appear automatically in your posts. If you use an ad management plugin like adsense-manager then you can paste the code given by that plugin in the text box, so that all your posts/pages will be “able” to display the code but actual display is controlled by your ad management plugin.

= How to upgrade to a new version =
Use the automatic upgrade option in WordPress or simply overwrite the old files with the new ones.

= How can I contribute to keep the development of this plugin going =
You could add a link to my blog from your site or click on the donate link on the settings screen πŸ™‚

= My question isn’t listed here =
Post a comment here, or contact me through the contact page.

== Screenshots ==

You can see the plugin in action on this site on any post (The links at top of each post, the adsense ads in the middle of the posts and the copyright notice and feed subscription links at the bottom)

== Version History ==

  • Version 1.1.4
    • Fixed input field size issues on settings page
    • Fixed the issue where the settings were not being saved
  • Version 1.1.3
    • Removed some debug code that crept into last version
  • Version 1.1.2
    • Added option for controlling plugin priority to resolve order issues if there are other plugins that add text to your posts.
    • WP 2.7.1 Compatibility
    • Minor cosmetic changes
  • Version 1.1.1
    • Fixed a bug that was causing conflicts with some other plugins that add content to end of posts
  • Version 1.1.0
    • Added option to add code/text to the middle of the posts
  • Version 1.0.5
    • Added option to enable/disable adding prefix/suffix to home page
    • Added option to enable/disable adding prefix/suffix to excerpts
    • Fixed a bug in which the prefix/suffix was displaying even if you set it not to
  • Version 1.0.4
    • Added option for using php code for prefix and suffix
  • Version 1.0.3
    • Fixed a bug that was causing prefix-suffix to not display under certain conditions
  • Version 1.0.2
    • Fixed a typo that was causing errors while activating the plugin
  • Version 1.0.1
    • Options to not display the prefix/suffix on pages also works for WP < 2.1
  • Version 1.0.0
    • Initial version

79 Responses

  1. Project: shantz-wp-qotd Updated and shantz-wp-prefix-suffix released | My Technophilic Musings

    […] Shantz WordPress Prefix Suffix […]

  2. GPSchnyder
    GPSchnyder at |

    Hi,

    I haven’t installed this jet, but is it possible to do this Prefix/Suffix only for special Categories?

  3. Project: shantz-wp-qotd and shantz-wp-prefix-suffix updated | My Technophilic Musings

    […] Shantz WordPress Prefix Suffix […]

  4. Kedavix
    Kedavix at |

    Hi Shantanu,

    I was wondering if you could share with me where I could acquire the code to add the social-bookmarking site icons to my blog posts. Also, would it be possible to customize them, as in add/remove certain ones?

    Thanks.

  5. Kedavix
    Kedavix at |

    Great! I’ve found it. The number of supported sites is waaay more than enough. Thanks. πŸ™‚

  6. Lars
    Lars at |

    Hi
    do you have any idea why I get a

    “Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected ‘{‘ in C:\xampplite\htdocs\wordpress\wp-content\plugins\shantz-wp-prefix-suffix\shantz-wp-prefix-suffix.php on line 135”

    when I try to activate the plugin?

  7. Thom Byxbe
    Thom Byxbe at |

    Currently as of Saturday, April 05 2008 this plugin failed under WordPress 2.5. Will you be updating it to work with 2.5?

    This is the notification WP gave me:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘{‘ in /home/thom/citb/wp-content/plugins/shantz-wp-prefix-suffix/shantz-wp-prefix-suffix.php on line 135

  8. Thom Byxbe
    Thom Byxbe at |

    Thank You Shantanu! This fixed the problem – I really like your QOTD plugin and I am looking forward to trying this one out!

  9. Project: shantz-wp-prefix-suffix Updated to 1.0.2 | My Technophilic Musings

    […] Shantz WordPress Prefix Suffix […]

  10. Nathan Cain
    Nathan Cain at |

    Should it add the suffix to old posts to? Why isn’t the suffix showing up on my site?: http://www.web-magnet.com/

  11. The Best Blogging Software (WordPress) + The Top 60 WordPress Plugins | Midas Oracle .ORG

    […] Shantz WordPress Prefix Suffix 1.0.3 Β» Shantanu Goel (url) This plugin shall give you the ability to add any text/HTML/CSS code to the beginning or end of your posts and/or pages. Go to shantz-wp-prefix-suffix for updates and support. Also visit my tech site. […]

  12. Philix
    Philix at |

    This is a great plug in πŸ™‚

  13. Saad Ibrahim
    Saad Ibrahim at |

    Hey, I have been using this plugin for a while now and loving it but unfortunately after I upgraded to wordpress 2.6 there has been some problem that is if uncheck “Add suffix to pages?” option then it wont show the prefix in post’s too otherwise its fine

  14. Saad Ibrahim
    Saad Ibrahim at |

    Thanks For the prompt Reply! looking forward to an update!

  15. Saad Ibrahim
    Saad Ibrahim at |

    Ooops Sorry! i deactivated the plugin and activated it again and everything was fine, sorry to bother you, how noobish of me

  16. Saad Ibrahim Lakhany
    Saad Ibrahim Lakhany at |

    Hello! i wanted to know is there a way in which i can place the code where i want to show the prefix/suffix in the single post.php file?

  17. Saad Ibrahim
    Saad Ibrahim at |

    Shantanu I mean is there any code that I can place in the single post.php file manually instead of enabling the option so that i can determine where the suffix shows up
    example:
    http://yoast.com/wordpress/sociable/
    ^see here, sociable allows you to to place a code where you want the icons to show!

    i want to show the suffix below the adsense ads see here:
    http://www.geekishblog.com/2008/08/exclude-your-own-visits-from-google-analytics-on-your-wordpress-blog/

  18. Saad Ibrahim
    Saad Ibrahim at |

    No problem take your time! Thank you so much, Appreciated!

  19. Saad Ibrahim
    Saad Ibrahim at |

    Hey Shantz!
    well the code is working after i put tag in the start and end of the code
    now i think it wont show up in the feeds will it?

  20. Saad Ibrahim
    Saad Ibrahim at |

    btw thanks mate!

  21. Saad Ibrahim Lakhany
    Saad Ibrahim Lakhany at |

    Yeah! the php start and end tags. Ok Thanks Mate Much Appreciated!

  22. WordPress Plugins Releases for 10/30 | Weblog Tools Collection

    […] Shantz WordPress Prefix Suffix […]

  23. WordPress Plugins Releases for 10/30 | Wordpress Blog NL

    […] Shantz WordPress Prefix Suffix […]

  24. Project: My WordPress Plugin Shantz-WP-Prefix-Suffix Updated To 1.0.5 | Shantanu's Technophilic Musings

    […] Shantz WordPress Prefix Suffix […]

  25. DivageekDesigns.com » Blog Archive » Nifty-ness - Wordpress plugins - Flickr slideshow

    […] Shantz WP Prefix Suffix – is a light plugin to quickly add text/htm/css before and/or after your posts and/or pages. […]

  26. Project: Shantz-WP-Prefix-Suffix Updated to 1.1.0 | Shantanu's Technophilic Musings

    […] Shantz WordPress Prefix Suffix […]

  27. baron
    baron at |

    hi. Thanks for plugin

    perfect.

    Regards

  28. Time Synchronisation
    Time Synchronisation at |

    This plug-in is really good

  29. km603
    km603 at |

    why do you add a back link on each post?

    After i installed this plugin, each post has a link “powered by shantz-wp-prefix-suffix” that links back to your site.

    that really kills this plugin

  30. Weight Loss For Women
    Weight Loss For Women at |

    Hi there,

    Great plugin – it works a charm except it won’t seem to display pictures on the actual post pages, only on the front page? Any way around this?

    Thank-you

  31. Weight Loss For Women
    Weight Loss For Women at |

    Problem solved – had to expand the url, many thanks – great job!

  32. 8 Wordpress Plugins for Ads | Tom B.'s Rambles

    […] Shantanu’s WP Prefix Suffix Plugin is not really an ad plugin. It allows you to add some form of content, text, HTML/CSS, javascript, etc., before, after, or in the middle of the a page or post. It can easily be used for ads, you just need to paste the code into one of the 3 input boxed, depending on where you want the ad to appear. And you have control over whether it appears on pages, posts, your homepage, and your excerpts. Easy to set up, and can be very useful for all kinds of things, but somewhat limited for ad placement. […]

  33. Shantz Wordpress Prefix Suffix
    Shantz Wordpress Prefix Suffix at |

    […] and easy to use plugin which allows you to add any text and/or HTML/CSS code to your posts …..read more Download Plugin! Version 1.1.1 Last Updated: November 27, 2008 Author: Shantanu Goel Visit […]

  34. Scott
    Scott at |

    Hi Shantanu

    Is it possible to have code in the suffix based on categories?

    Thanks

  35. Mike
    Mike at |

    For some reason I cannot get this to work. First off, the little boxes for “Plugin Priority” et al are too small for me to be able to read any numbers I place in them. Secondly, whenever I click on the “Update Settings” button nothing happens. I am using the latest version of the plugin and WP 2.7.1.

  36. Project: Shantz WordPress Prefix Suffix Updated to 1.1.2 | Shantanu's Technophilic Musings

    […] more details and downloads, head on to the Shantz WP Prefix Suffix Home Page and do not hesitate to post any questions you have, or feature requests as […]

  37. Project: My WordPress Plugin Shantz WP Prefix Suffix Updated to 1.1.4 | Shantanu's Technophilic Musings

    […] the settings were no longer being saved. Also fixed some minor cosmetic issues. So, hop on to the Shantz WordPress Prefix Suffix Home Page for downloads and details. And yes, don’t forget to leave […]

  38. Mike Wheeler
    Mike Wheeler at |

    I just upgraded to 1.1.4 (and WordPress 2.7.1) and the plugin no longer places content in the middle of posts properly. Looking at the code I see it splits the post content on a closing p tag. Looking at the content it is parsing, I see the line breaks have not yet been converted to paragraph tags. I fixed this by changin a couple lines. Starting around line 338 I changed:

    $array = explode(“”, $content);
    for($i = 0; $i < count($array); $i++)
    {
    $temp_content .= $array[$i];

    to:

    $array = explode(“\r\n\r\n”, $content);
    for($i = 0; $i < count($array); $i++)
    {
    $temp_content .= $array[$i] . “\r\n\r\n”;

  39. Mike Wheeler
    Mike Wheeler at |

    The first line I changed from should read:

    $array = explode(“</p>”, $content);

    (the comment processing form stripped that tag)

  40. Wordpress Plugins For AdSense - Comprehensive List Updated Regularly | CompuWorld

    […] Shantz WordPress Prefix Suffix (Plugin Homepage) […]

  41. Andy
    Andy at |

    Hi, I’ve been looking for ages for a plugin to add say, a single random or another post to the end of a single post page. This may be the answer – but how could I add post(s) either random or otherwise using this?
    Probably this is a bit ambitious, but if you can quickly even point me in the right direction I’d appreciate it!

  42. Andy
    Andy at |

    Thanks very much for the prompt reply – I had a look at that but don’t yet have the PHP experience to work out the exact code to put in the box to display say, 5 random posts but not the one in the post. Tried several times but just got the code line that I put in obviously I’ve done it wrong! I’ll leave it for a while and study php some more. Thanks again. Andy

  43. Andy
    Andy at |

    Yes, I did but I couldn’t work out the syntax to get the code to work (and the way I wanted). I tried some of the php examples from the codex and the syntax for them seemed correct but none worked when put in the PHP box. I just got the code displayed.
    As I said, I’ll spend some time looking at the examples on the codex and see how I get on when I have the time.

  44. Another Great Affiliate that actually pays! $$ WPWebHost | DivageekDesigns.com

    […] I just signed up with them as an affiliate and added a banner to the bottom of my posts using the Shantz WordPress Prefix/Suffix Plugin which I also love by the […]

  45. ibdreamy
    ibdreamy at |

    I just want to say I’m shocked you only have a 3 star rating. I love this plugin and use it on all my WordPress installs. It’s perfect and it gets the job done with as little fuss as possible and I like that. Thank you for sharing this cool little blogging tool.
    divageekdesigns.com

  46. Carlos Velez
    Carlos Velez at |

    Hello,

    I just installed this plug-in yesterday and am very impressed. It does everything I want right now, plus more that I’ll want in the future. I am also impressed with how quickly and effectively you answer questions on here.

    Here’s a problem I’m having. It seems to operate fine, it’s displaying everything correctly, but when I try to save a new draft it brings up a plain white screen with this message instead of saving my draft:

    Warning: Cannot modify header information – headers already sent by (output started at /home7/phoxieph/public_html/consciousme/wp-content/plugins/shantz-wp-prefix-suffix/shantz-wp-prefix-suffix.php:317) in /home7/phoxieph/public_html/consciousme/wp-includes/pluggable.php on line 865

    I can get around this by deactivating the plug-in, but when I reactivate I have the same problem.

    Thanks!
    -Carlos

  47. Carlos Velez
    Carlos Velez at |

    I don’t even know what a caching plugin is. I have the version of wordpress before 2.9.1. I haven’t upgraded yet because I need to back up everything first.

  48. Netrix
    Netrix at |

    php not work with wordpress 2.91

  49. Sue
    Sue at |

    I’ve just installed this plugin to V 2.91 it seems O.K. but the Settings link doesn’t appear so there is no way of creating ADs. Any advice?

  50. Scotty
    Scotty at |

    One issue I notice. The suffix goes before the [read more] more, even if I set settings to be ‘after 10 paragraphs’ or X number of words. It always wants to place it before [Read more] in intro text. How do I stop this? When you get full article view, it’s at bottom where it should be.

  51. tommy
    tommy at |

    Hi,

    Does this plugin work with WP 3.0.2?

    Thanks

  52. test on adds « Familien Therese Enger Andersen

    […] href="Go to shantz-wp-prefix-suffix for updates and support. Also visit my tech site. For Programming and secure coding related info, […]

  53. Shantz Wordpress Prefix Suffix | Best Plugins - wordpress – widgets – plugin 2012

    […] Shantz WP Prefix Suffix is a light-weight and easy to use plugin which allows you to add any text and/or HTML/CSS code to your posts and/or pages as prefix (top / beginning), middle and/or suffix (bottom /end). (That includes even any new or old posts and pages and even your feed) Examples of use cases could be to include your copyright message, advertisements (like adsense, etc), permalinks, your other site links, any other custom messages. This works very fine with ads as you don’t have to manipulate your posts or templates to add the ad code, shantz-wp-prefix-suffix will do that for you automatically for all posts and you also get basic controls whether to “display” the ad or not (on home pages, excerpts, etc). (For Complete Details and to see the plugin in use, go to my tech blog) […]

Comments are closed.