Support » Plugins » Create plugin…

  • Resolved icyville


    I’d like to create a plugin that is similar to the digg it plugin but is for my site. I have the js code that will make the image appear and grab the url and such but i don’t no how to code a wordpress plugin so that it’ll add the script after every post. can anyone help by giving me a tutorial or some old plugin i can just change around (all i need is a plugin to input text at the end of each post).

Viewing 6 replies - 1 through 6 (of 6 total)
  • Here you go.

    Well, it does more than add text, but I’m sure you can strip it down to what you need. I hope?

    what’s wrong with this code i created, it says i have a parse error on line 1

    Plugin Name: Dope-Submit
    Plugin URI:
    Description: Give your readers a way to submit articles to Thats Super Dope.
    Version: 1.0
    Author: Bruce Ackerman
    Author URI:
    function dope_submit($content) {
    	if ( !is_feed() && !is_page() )
    		$content .= '<script type="text/javascript" src=""></script>
    	return $content;
    add_filter('the_content', 'dope_submit', 999);

    Try deleting the first newline, so that the first two lines will be


    Did you get what you needed from the plugin i linked you?

    “Parse error: syntax error, unexpected T_STRING” Any suggestions?

    That’s the error I still get. I actually modified a plugin called subscribe-remind because it was easy to do. I appreciate the link though.

    I also get all this weird code for the dope-submit plugin when I look at my plugins section of wordpress. it’s like putting the php code in for the title, version and description, what the heck??

    I see nothing wrong with the code from here (well… :).

    Try downloading this copy of it and compare with yours:

    Note that by ‘compare’ I don’t just mean look at the two files source in an editor. Also look at how you are saving your plugin file, and how you are uploading it (if testing is not being done locally).

    everything works, thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Create plugin…’ is closed to new replies.