November 29, 2018 at 2:40 pm #9237
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.
November 30, 2018 at 12:41 pm #9239
@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: Piklistin the header of your main plugin file as specified here:
That tells Piklist to go scan the plugins folders for files.
Let us know if that works.
December 2, 2018 at 2:41 pm #9241
Thanks. I thought I had tried this, but I guess it was just in the wrong combination or something. All working now.
December 2, 2018 at 3:00 pm #9242
Great! Marking this resolved
The topic ‘Creating a Settings page, doesn't work/strange behaviour’ is closed to new replies.