• Hey guys i just wanted to develop a simple plugin for my personal use. I want to have an additional field in the Create New Post/Page page that inputs an url for that particular post.. Basically every differant post should have a differant url but they needn’t be unique..

    And in the single.php or page.php I want to display this url.. As simple as that.. But I am not used to coding plugins for wordpress so I have just asked you guys..

    Please help…

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter coolkarthik88

    (@coolkarthik88)

    well everything is ok for now. I moved the plugin to its own folder and after activating it doesen’t create the new database column. I think there is something wrong actvate_digg_this.php hook…

    Is your plugin file digg_this.php?
    ‘activate_filename.php’ in the hook must meets the actual file name.

    Try echo something in the function to see if the function is really being called.

    function diggurl_addcolumn () {
    die ('hook called');
    ...

    qwerios

    (@qwerios)

    I’ve been struggling a bit with the activate hook as well. I found that changing my plugin file to all lowercase and with no underscores in the name made the activation hook work.

    So instead of myPlugin.php or my_plugin.php I had to use myplugin.php and then the add_action( “activate_myplugin.php”, “install_function” ) worked.

    I couldn’t find it in the documentation that this was required so I discovered it with trial and error. Granted I’m quite new at this plugin writing stuff so maybe I just missed it being mentioned somewhere.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Help Me Develop a Plugin’ is closed to new replies.