Forum Replies Created
-
AuthorPosts
-
SteveKeymasterCan you send login and ftp credentials?
SteveKeymasterTry setting
get_post_metatofalse:$get_post_meta = get_post_meta($post->ID, 'ingredient_section', false);
Let me know if that fixes the issue.
SteveKeymaster@cosmocanuck– Hope this helps:
get_post_meta vs get_post_custom
They are both standard WordPress functions. However,get_post_custom()returns a serialized array, which can be pretty ugly to deal with. You can take a look at how both are returned by doing something like this:// Grab the data two different ways $get_post_meta = get_post_meta($post->ID, 'my_field_key', false); $get_post_custom = get_post_custom($post->ID); // Display the data print_r($get_post_meta); print_r($get_post_custom['my_field_key']);
get_stylesheet_directory_uri() vs get_stylesheet_directory()
These are also standard WordPress functions.get_stylesheet_directory()returns the PATH to the theme directory,get_stylesheet_directory_uri()returns the URL.You can see the difference with this code:
echo get_stylesheet_directory_uri(); echo get_stylesheet_directory();
SteveKeymasterIf it works in one place then it’s obviously an error.
Try duplicating the code again. Also verify that you changed all the field names. Duplicate field names on the same page can make everything blow up.
SteveKeymasterGlad it worked. Scalability shouldn’t be an issue.
SteveKeymaster@cosmocanuck– would you mind posting your code? I would like to put it in the Demos.
SteveKeymaster@cosmocanuck– You were pretty close. Group fields are really, really powerful, but sometimes the layout gets tricky. A few tips:
-It’s best to use the
columnparameter for layout. Piklist has a built-in 12 column grid system.
-Actual fields in WordPress do not have descriptions, just the main field name. I replaced one of your field descriptions with a tooltip.
–HTML fields are awesome when you don’t want to enter content, but only show it… including labels.
-Try to use the code in Piklist Demos as a starting point. I used Advanced > Content Section (Grouped).Take a look at the attached screenshot to make sure I got it right. Here’s the code:
piklist('field', array( 'type' => 'group' ,'field' => 'component' ,'label' => __('Components') ,'description' => __('Add additional Components if a recipe has separate listings for different parts, i.e. the salad and the dressing.') ,'add_more' => true ,'fields' => array( array( 'type' => 'html' ,'label' => __('Ingredients') ,'help' => __('For consistency, please only capitalize sentences and Superior product names; otherwise keep all text lower case.') ,'columns' => 12 ,'attributes' => array( 'class' => 'large-text' ) ) ,array( 'type' => 'group' ,'field' => 'ingredient' ,'add_more' => true ,'fields' => array( array( 'type' => 'number' ,'field' => 'ingredient_qty' ,'label' => __('Qty') ,'columns' => 1 ) ,array( 'type' => 'textarea' ,'field' => 'ingredient_descrip' ,'label' => __('Description') ,'columns' => 11 ) ) ) ) ));Attachments:
You must be logged in to view attached files.
SteveKeymasterThis was such an awesome idea I created a tutorial with screenshots >
Let us know if you need any more help.
SteveKeymasterWelcome to our community!
This is a pretty awesome idea, and of course you can do this with Piklist! The code shown below will create a different taxonomy for each logged in user. User #1 will use the taxonomy ‘personal_tags_1’, and User #2 will use the taxonomy ‘personal_tags_2’
add_filter('piklist_taxonomies', 'my_custom_taxonomies'); function my_custom_taxonomies($taxonomies) { global $current_user; get_currentuserinfo(); // Get logged in user info $taxonomies[] = array( 'post_type' => array('post') ,'name' => 'personal_tags_' . $current_user->ID // Append User ID to taxonomy name ,'configuration' => array( 'hierarchical' => false ,'labels' => piklist('taxonomy_labels', $current_user->display_name . "'s Tag") // Append user name to Taxonomy labels ,'show_ui' => true ,'query_var' => true ,'rewrite' => array( 'slug' => 'personal_tags_' . $current_user->ID // Append user ID to taxonomy slug ) ,'show_admin_column' => true ,'comments' => true ) ); return $taxonomies; }Let us know if this works for you
SteveKeymaster@jezzdk– Welcome to our community! We really don’t support including Piklist directly in your theme. Here’s the reason why >
If you need to remove the Piklist Admin menu, place this code in your themes functions.php file:
function remove_piklist_menu($pages) { foreach ($pages as $page => $value) // Loop through all admin pages registered with Piklist { if($value['menu_slug'] == 'piklist') // Check for the Piklist menu { unset($pages[$page]); // Remove it from the $pages array } } return $pages; } add_filter('piklist_admin_pages', 'remove_piklist_menu');This will only remove the Piklist menu. If you want to build other settings pages with Piklist they will still work.
SteveKeymaster@fencer04– Since Widgets are so easy to build with Piklist, our users are building tons of them. Piklist groups them together by theme/plugin/add-on to make the widget admin manageable.
Glad it’s working for you!
SteveKeymaster@fencer04– Welcome to our community!
Your news.php file has some mixed up php tags. Try this:
Remember, Piklist rolls up all your widgets under the plugin/theme name. So look for ‘Theme Name Widgets’ in the widget admin.
SteveKeymaster@stevo81989– As per your email it looks like you got everything working. Closing this ticket.
November 24, 2014 at 3:39 pm in reply to: Sidebar Taxonomy not working when Workflow is active #2846
SteveKeymaster@ehoanshelt– Glad to help. Closing ticket.
-
AuthorPosts