Tagged: metaboxes not showing in settings tabs, setting, settingpage, settings pages, tab, tabs not pulling metaboxes, workflow, Workflows
- This topic has 7 replies, 2 voices, and was last updated 5 years, 7 months ago by
Steve.
-
AuthorPosts
-
-
July 5, 2016 at 6:26 am #6880
semwangajoshuaMemberI’m having a really hard time to get my settings tabbed pages to work. I’ve tried using workflows and as well without them but nothing seems to work. I’ve already created my settings pages and populated them with fields. These settings pages and their tabs were working fine until I upgraded to the latest version of 0.9.9.9. I’ve created the tabs using the old method i.e., without using workflows and they seem to work; but only with one problem. When I use two or more words separated by space, it changes the name to a single word in sentence case joining the two words with an underscore. Now this is not the most challenging since I can choose to use only one word for the tab name. The actual problem however is that metaboxes themselves and fields on the settings pages designated to show on particular don’t show up at all. Using the workflows worsens the problem as that makes even the tabs disappear altogether. I’ve been stuck with this problem for the last two or so weeks. I feel I’m burning out. Does somebody there no how I can make this work?
I have this code in one of my settings files named footer-settings.php:
/* Title: Footer Setting setting: libra_custom_settings Tab: Footer */I have this code in another settings file named basic-settings.php:
/* Title: Basic Setting: libra_custom_settings */I have this code in my functions.php file:
add_filter('piklist_admin_pages', 'piklist_theme_setting_pages'); function piklist_theme_setting_pages($pages) { $pages[] = array( 'page_title' => __('Libra Settings') ,'menu_title' => __('Theme Settings', 'piklist') ,'sub_menu' => 'themes.php' //Under Appearance menu ,'capability' => 'manage_options' ,'menu_slug' => 'libra_custom_settings' ,'setting' => 'my_theme_settings' ,'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png') ,'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png') ,'single_line' => true ,'default_tab' => 'Basic' ,'save_text' => 'Save Demo Settings' ); return $pages; }I have this code in the comment block of another settings file that displays the General tab:
/* Title: Component visibility Settings Section setting: lawyeah_custom_settings Tab: General */I have this code in the comment block of another settings file that displays the Social Options tab:
/* Title: Social Media Settings Setting: libra_custom_settings Tab: Social-Options */I wonder what exactly I’m doing wrong. The attached snip shows what I already have with everything as it is right now. Any help is very much appreciated. Thanks
Attachments:
You must be logged in to view attached files. -
July 5, 2016 at 11:07 am #6889
SteveKeymasterIt looks like you’re missing the
flowparameter. Please check the built-in demos. -
July 6, 2016 at 4:20 pm #6905
SteveKeymaster@semwangajoshua– Thanks for sending over your files. I fixed the issues and emailed it back to you. Here were the issues:
1) In the Workflow header file, you had the page set to
Page: basic-settings.php, WordPress settings pages are part of the query parameter (e.g. ?page=lawyeah_custom_settings), so I changed it toPage: lawyeah_custom_settings.2) Tabs are built in the /workflows folder… then you can assign settings sections to them.
3) Each settings section requires the
workflowparameter. This allows you to have multiple workflows on any page.I also noticed a few notices coming from spaces before and after, opening and closing php tags.
Let me know how it works.
-
July 7, 2016 at 12:00 pm #6913
semwangajoshuaMemberI’ve my email box and I don’t seem to find the files you sent. May be they didn’t come. However, I’ve tried the advice you gave me here; but unfortunately the problem isn’t yet solved. I’ve tried a number of things but in vain. I’ve resent you the project files as per the changes I’ve made so that you have a look at them. Two things don’t seem to work together just like I pointed out to you in earlier emails I sent you. The issue concerns using the ‘true’ settings value for the settings parameter in settings files; in which case the tabs won’t work. And then using the menu_slug value in place of the expected settings value for the settings parameter in the settings files. This is my request to you Steve. I have the settings fields showing now on one single page. May you help me figure out how to organize them into tabs. Since when one works, the other fails.
-
July 7, 2016 at 12:06 pm #6914
SteveKeymasterThis reply has been marked as private. -
July 7, 2016 at 12:14 pm #6915
semwangajoshuaMemberI’ve sent you a followup email with more details about the issue and added some explanatory comments in the settings files about my understanding of the problem. I’ll be glad to hear from you. Thanks a lot for the support.
-
July 7, 2016 at 12:24 pm #6916
semwangajoshuaMemberPlease forgive me for the quick response. I’d not seen yet the download link; so I attempted out on my own. However, in the edited files you sent me for download, it’s working. I’ll keep you updated in case anything comes up. Sorry for the alarm. Thanks a lot for the help. I was losing my head over the issue. I honestly can’t thank you enough. I’m humbled.
-
July 7, 2016 at 12:27 pm #6917
SteveKeymasterSo, glad it’s working. Please review them… you were close 😉
Closing this ticket.
-
-
AuthorPosts
- The topic ‘Metaboxes in tabbed Settings Pages not showing’ is closed to new replies.