Viewing 7 reply threads
  • Author
    Posts
    • #6880

      I’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.
    • #6889
      Steve
      Keymaster

      It looks like you’re missing the flow parameter. Please check the built-in demos.

    • #6905
      Steve
      Keymaster

      @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 to Page: 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 workflow parameter. 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.

    • #6913

      I’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.

    • #6914
      Steve
      Keymaster
      This reply has been marked as private.
    • #6915

      I’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.

    • #6916

      Please 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.

    • #6917
      Steve
      Keymaster

      So, glad it’s working. Please review them… you were close 😉

      Closing this ticket.

Viewing 7 reply threads
  • The topic ‘Metaboxes in tabbed Settings Pages not showing’ is closed to new replies.