Viewing 3 reply threads
  • Author
    Posts
    • #9237
      mrsdrjim
      Participant

      I want to create a settings page from within a plugin. I copy and pasted directly from the doc.

      The menu would be created and the basic page loads, but no page content from demo-settings.php at all. I tried all kinds of variations on folder structure and nothing worked.

      Then, for the heck of it, I tried putting the demo-settings.php file inside the Piklist plugin’s parts/settings directory and now it shows up.

      This seems really incorrect. Should it not be parts/settings inside MY plugin’s folder, and not Piklist’s folder?

      Only structure that works:

      plugins/
          piklist/
              parts/
                settings/
                    demo-settings.php
          my_plugin_name/
              my_plugin_name.php
      

      Running on version 1.0.1 of Piklist and an almost bare WP install.

    • #9239
      Steve
      Keymaster

      @mrsdrjim– Thank you for using Piklist and welcome to our community!

      You don’t need to add code to the Piklist plugin itself. The original way you were doing it sounds right.

      Make sure you include Plugin Type: Piklist in the header of your main plugin file as specified here:
      https://piklist.github.io/docs/getting-started/writing-a-plugin-for-piklist/

      That tells Piklist to go scan the plugins folders for files.

      Let us know if that works.

    • #9241
      mrsdrjim
      Participant

      Thanks. I thought I had tried this, but I guess it was just in the wrong combination or something. All working now.

    • #9242
      Steve
      Keymaster

      Great! Marking this resolved

Viewing 3 reply threads
  • The topic ‘Creating a Settings page, doesn't work/strange behaviour’ is closed to new replies.