Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #111
      ehoanshelt
      Member

      I’m having issues going through your tutorials. I’m trying to create a custom post type “Provider”. I have a child theme so I added the following code in the child theme function.php file.

      http://pastebin.com/0mgn8cea

      Then I will need a select meta-box for the post type. So in the child theme, I created piklist/parts/meta-boxes/field-select.php and this is the code in their:

      http://pastebin.com/pn6Di0aJ

      When this code is implemented, nothing shows up in the admin dashboard for me to start adding providers.

      Do you see something I’m doing wrong?

    • #112
      Kevin
      Keymaster

      Hi ehoanshelt-

      It looks like all you were missing was a closing ) on your meta-box field. I have updated the to pastebin’s and posted the links below. They are working and you should be able to just cut and paste. Let me know if you run into anything else.

      http://pastebin.com/AGzEdQ6w
      http://pastebin.com/wXP0rDpB

      Thanks,

      Kevin

      PS. I added ‘position’ to your field so its wrapped in the correct template (this feature will be easier in a forthcoming release 😉

    • #113
      ehoanshelt
      Member

      Thank Kevin,

      I got it working! I got another question. Is their a way to get checkboxes to style like categories in the post sidebar? I know we can add the position to the “side” but it is just a long list of checkboxes rather then a scrollable list. Any ideas?

    • #114
      Kevin
      Keymaster

      Great question and so happy to hear you ask 🙂 We actually finished the tab system in WordPress so you can use it in your meta boxes. Check out the following file in the demo add-on for an example of how to use it and let me know if you have any questions (you just need to use the markup, everything else is automatic).

      piklist/add-ons/piklist-demos/parts/shared/meta-field-welcome.php

      Thanks,

      Kevin

    • #115
      Steve
      Keymaster

      @ehoanshelt- It’s best practice to make the “field” name all lowercase letters and numbers with no spaces or special characters if possible. What you did will work, but this method is a best practice when working with database fields.

      For example:
      THIS:
      ‘Alcohol/Drug Counselor’ => ‘Alcohol/Drug Counselor’
      WOULD BE BETTER AS:
      ‘alcohol-drug-counselor’ => ‘Alcohol/Drug Counselor’

      I updated Step 4 of our tutorial to reflect this.

    • #116
      ehoanshelt
      Member

      Hey Steve and Kevin,

      Thanks for the info! I will take a look at the demo and see if I can pull it off.

      Thanks again for the great support!

Viewing 5 reply threads
  • You must be logged in to reply to this topic.