WordPress.org

Ready to get started?Download WordPress

Forums

Error when creating a plugin (3 posts)

  1. shmk
    Member
    Posted 3 years ago #

    I'm trying to create a plugin, I've made a folder in plugins and inserted a php file named like the folder in it.

    in the main php I've inserted the description comment like this
    /*
    Plugin Name: My Plugin Name
    Plugin URI: http://www.example.tld
    Description: My Plugin Description
    Author: Me
    Version: 1.0.0
    Author URI: http://www.example.tld
    */

    When I go in the Plugins page I can see my new plugin but the name is not the one I've inserted in Plugin Name but are ALL the data I've inserted and in a single line.
    Something like: Plugin Name: My Plugin NamePluginURI:http://www.example.tldDescription: My Plugin DescriptionAuthor: MeVersion: 1.0.0Author URI: http://www.example.tld

    Anyone could give me a hand?

  2. Ganners
    Member
    Posted 3 years ago #

    What if you copy this straight out:

    <?php
    /*
    Plugin Name: Hello-World
    Plugin URI: http://yourdomain.com/
    Description: A simple hello world wordpress plugin
    Version: 1.0
    Author: Me
    Author URI: http://yourdomain.com
    License: GPL
    */
    ?>

    Does that work? Did you include <?php and ?> in it?

  3. shmk
    Member
    Posted 3 years ago #

    Yes I've inserted the php opening and closing tag.

    If I copy/paste your code in a new file I get the same error...

    BUT I'VE FOUND THE SOLUTION :)

    My text editor was saving the file in "MAC" (oh my gosh... and think that I hate them so much...) endline format, so I've converted to Unix and now is fine ;)

Topic Closed

This topic has been closed to new replies.

About this Topic