Support » Plugin: Pods - Custom Content Types and Fields » Custom Settings page

  • Resolved bot12313


    How can I programmly create fields on the PODS custom settings page?
    Some more information:
    When I need to create meta fields for custom posts, I use something like that:

    function create_fields( $type, $name ) {
    	$fields = array(array('name' => 'welcome_text',
    						  'label' => 'Welcome text',
    						  'type' => 'wysiwyg',
    						  'description' => 'Enter welcome text'),
    					array('name' => 'more_text',
    					      'label' => 'We need more text fields!',
    					      'type' => 'wysiwyg',
    					      'description' => 'Enter one more text');
    	pods_group_add ("lesson","Useful fields", $fields,"normal","default");
    add_action( 'pods_meta_groups', 'create_fields', 10, 2);

    But how can I control fields for custom settings page, created with pods ?

    • This topic was modified 1 month, 3 weeks ago by  bot12313. Reason: gramma
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jim True


    You want to change the style of the Settings page to use Post Style in the Admin UI tab, then the pods_group_add functions will work.

    Oh, that’s easier than I thought. Thank you!

    • This reply was modified 1 month, 3 weeks ago by  bot12313.

    I think I’ve made a hasty conclusion. I succeed in adding my fields to the page, but I can’t save them – there an error “Error: custom settings page not saved” if I have no fields added with PODs plugin interface (let’s call this hand-added field “h”. In this case the only “h”-field’s value will be saved, but programmly added won’t)

    Plugin Author Jim True


    Now I’m confused. The fields do have to be Pods created if you want to include them in the pods_group_add interface. You probably should create and save them first and then add the coffee later.

    Plugin Author Jim True


    We haven’t heard back from you on this one in over a week, so we have to assume you’re no longer having the issue or have come to another solution. We’re resolving this ticket.

    If you’re still having issues, please feel free to ‘unresolve’ it and reply and we’ll get back to it again. You can also drop into our Slack Chat at if you need help.


Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.