Viewing 4 reply threads
  • Author
    Posts
    • #946
      chrisben
      Member

      I create a simple plugin with this structure:

      plugins/myplugin/
                       myplugin.php
                       parts/meta-boxes/
                                        mybox.php
      

      Those files are pretty simple, I define one custom post type and mybox.php adds one meta box with a simple field in there.
      The file mybox.php never gets loaded despite several hours of tinkering and re-reading the documentation, the content of the file is correct and should load on the same post-type as the one defined in myplugin.php.

      BUT when i move my meta-boxes folder into the main piklist plugin parts/ folder (plugins/piklist/parts), mybox.php gets read and I can see my meta box in my custom post type (=> the content of mybox.php is not the problem).

      It looks like piklist doesn’t access the “parts” folder of my plugin and instead looks into its own folder.
      I’ve triple checked the folder permissions for everything : the server is able to access the subfolders of my plugin.
      My web server is apache2 on Linux.

      I’ve had the same problem with stable piklist (0.7) and latest beta 2 release.

    • #950
      Kevin
      Keymaster

      Make sure you put this in the comment block of your plugin:

      Plugin Type: Piklist

      Thanks,

      Kevin

    • #955
      chrisben
      Member

      It worked!! Thanks a lot Kevin.

    • #3849
      graup
      Member

      I just ran into the same problem. Might be worth mentioning here or here.

    • #3852
      Steve
      Keymaster

      @graup– Thanks for letting us know. We have this tutorial, but obviously it’s not working. We are in the process of redoing our user guide and will take this into consideration.

Viewing 4 reply threads
  • The topic ‘Fail to create custom meta boxes for simple plugin’ is closed to new replies.