efrap
Forum Replies Created
-
Forum: Plugins
In reply to: [qTranslate X] BuddyPress x-Profile radio checkboxSorry, never did.
Forum: Plugins
In reply to: [Ultimate WP Query Search Filter] ID order of itemssolution:
add_filter('uwpqsf_taxonomy_arg', 'change_order','',2); function change_order($args,$formid){ if ($formid == 'tax_slug'){ $args['orderby']='id'; $args['order']='ASC'; } return $args; }
Forum: Plugins
In reply to: [Ultimate WP Query Search Filter] ID order of itemsNice, anyway to limit this to one taxonomy?
Forum: Plugins
In reply to: CPT-onomies – "all items" translationFound “define the CPT-onomy labels” on line 980 of manager.php.
Terms like search, popular, all, are hardcoded in english, this is problematic for internationalization.
Forum: Plugins
In reply to: [Custom Post Type UI] Taxonomy Display Name / Uppercase Problemline 37 of cptui.js, targeting #name instead of #slug
Forum: Plugins
In reply to: [Custom Post Type UI] Taxonomy Display Name / Uppercase ProblemSame problem here. Some script is converting taxonomy name change as I type with underscores for spaces and lowercasing all.
Forum: Plugins
In reply to: using wp_set_object with CPT onony and Events managerThe solution is to handle post meta without cpt-onomies. In the frontend EM event form, there are two CPT-onomies, one dropdown and one with chexboxes. By comparing form selection to post CPT-onomies post-meta, it is possible to add and remove.
function save_onomies($result,$EM_Event){ if( $result ){ if( !is_admin() ){ $single = intval($_POST['taxa']); $multiple = array_map('intval', (array)$_POST['tax_input']['taxb']); $multiple[] = $single; // add single onomy to array $onomies = get_post_meta ( $EM_Event->ID, CPT_ONOMIES_POSTMETA_KEY ); $toadds = array_diff( $multiple, $onomies ); if ( $toadds ) { foreach( $toadds as $toadd ) { add_post_meta( $EM_Event->ID, CPT_ONOMIES_POSTMETA_KEY, $toadd, false); } } $todeletes = array_diff( $onomies, $multiple ); if ( $todeletes ) { foreach( $todeletes as $todelete ) { delete_post_meta($EM_Event->ID, CPT_ONOMIES_POSTMETA_KEY, $todelete ); } } } } return $result; } add_action( 'em_event_save', 'save_onomies',9,2 );
I played around with event-editor.php and was able to add taxonomies there. I will be looking for some insight on how to save changes. I will get the pro version on Monday for some support with this. Thank you.
Thank you for your response. I would be glad to purchase the pro version for the enhanced support offered. I am not an expert coder, but I can get by. Just one question really: will it be possible to add custom taxonomies to the front end event form? I will need some guidance with this.
Yes, user-submitted on front end. I have experimented with custom taxonomies that seem to work ok in the admin area, but I really need checkboxes to work on front end for users – and also to make event searches on some of them. Thank you.
Wow, that’s great Sven, thank you!
Solution found by locating wp_set_post_terms in buddyforms plugin (form-control.php) and replacing it by $cpt_onomy->wp_set_post_terms and adding globals for cpt_onomy.
// wp_set_post_terms($post_id, $tax_item, $customfield['taxonomy'], false); global $cpt_onomies_manager, $cpt_onomy; $cpt_onomy->wp_set_post_terms($post_id, $tax_item, $customfield['taxonomy'], false);
Hoping the same can be achieved with events manager.
Forum: Plugins
In reply to: [WooCommerce] Use first-last names from form, not logged in user nameNever mind. I now see that billing name is still accessible in the order.
Forum: Plugins
In reply to: [W4 Post List] post list of categoriesWorks out if 313 is commented out.
Forum: Plugins
In reply to: [W4 Post List] post list of categoriesSimply trying to list some categories. This won’t work:
<ul>[terms] <li> [term_name] </li> [/terms] </ul>
Error in twenty-fourteen theme:
Warning: in_array() expects parameter 2 to be array
wp-content\themes\twentyfourteen\inc\featured-content.php on line 313