Forum Replies Created
-
AuthorPosts
-
obiseanMembersorry, I meant to say “on the Advanced tab of the Piklist Demo settings page”
obiseanMemberKevin,
Here is my settings page registration:
$pages[] = array(
'page_title' => 'Manage Shows'
, 'menu_title' => 'OBX Forum'
, 'capability' => 'delete_users'
, 'menu_slug' => 'obx-forum-shows'
, 'setting' => 'obx-forum-show-settings'
, 'icon' => 'options-general'
, 'default_tab' => 'Manage Shows'
);
and here are the fields:
<?php
/*
Title: Manage Seasons
Setting: obx-forum-show-settings
Order: 20
Tab: Seasons
*/piklist('field', array(
'type' => 'text'
,'field' => 'rowSeatsCustomSeasons'
,'label' => __('Add Seasons')
,'add_more' => true
,'attributes' => array(
'class' => 'text'
)
));piklist('field', array(
'type' => 'group'
,'field' => 'CustomSeasonInfo'
,'add_more' => true
,'label' => __('Add Seasons')
,'fields' => array(
array(
'type' => 'text'
,'label' => 'Season Name'
,'field' => 'CustomSeasonInfoName'
,'columns' => 5
)
,array(
'type' => 'text'
,'label' => 'Price Per Seat'
,'field' => 'CustomSeasonInfoSeatPrice'
,'columns' => 3
)
,array(
'type' => 'text'
,'label' => 'Membership Price'
,'field' => 'CustomSeasonInfoMemershipPrice'
,'columns' => 3
)
)
));?>
Just to clarify, I am only having this issue on settings pages. Add more groups work fine as post meta.
Also, I cannot get the Add-More Group, labeled “Group ~ List Example” on the Advanced tab of the Piklist Demo add-on to save information either. Let me know if I can provide any more info.Thanks
obiseanMemberGreat! Thanks Steve, everything is loading up properly now.
obiseanMemberHey Steve,
The problem turned out to be something on my local Windows 7 box. On the windows box the paths to the javascript do not. However, I loaded it on a local Ubuntu 12.04 box and it works just fine. It also works fine on a live server. Maybe a conflict with windows file paths?
obiseanMemberForgot to mention, that the add-more fields are not working. Which is why I checked the JS loading. The fields show up but no + shows up when hovering next to the field
obiseanMemberHi Steve,
Unfortunately, I couldn’t get that to work either. However, if I set the “sub-menu” item to just
'sub_menu' => 'memberships'
The submenu is created, but the sub menu items URL is incorrect. The url ends up being
mysite.com/wp-admin/piklist-member-fields
But I believe it should be
wp-admin/admin.php?page=piklist-member-fields
I know it is not your problem to trouble shoot my issues. So I don’t want you to think I expect you to find the answer or anything. I was just wondering if you had any clues to where this might be going wrong.
Thanks again for your help. It is greatly appreciated.
obiseanMemberHi Kevin,
Wow, thanks for the speedy response! I am new to WP (moving away from years of forced Drupal) and was unaware of that hook. Making these forms with piklist will save me loads of time.
I do have one more questions. I am having some trouble with the settings page URL. If I add a settings page like this:
function custom_member_setting_pages($pages)
{
$pages[] = array(
'page_title' => 'Member Settings' // Title of page
,'menu_title' => 'Members Settings' // Title of menu link
,'sub_menu' => 'admin.php?page=memberships' // Show this page under the THEMES menu
,'capability' => 'manage_options' // Minimum capability to see this page
,'menu_slug' => 'piklist-member-fields' // Menu slug
,'setting' => 'member-custom' // The settings name
,'save' => true // true = show save button / false = hide save button
);return $pages;
}
The settings page is not created. The ‘sub_menu’ => ‘admin.php?page=memberships’ is an existing top level settings page from another plugin I wrote without piklist. If I substitute the sub_menu item with “options_general.php” or other menu pages like the piklist demo menu items, it works just fine. am I doing something wrong?
Thanks again for your help. You guys are awesome!
Take Care,
Sean -
AuthorPosts