cocosay
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [WooCommerce] woocommerce_form_field pass array to select optionsEDIT:
This is how I fill in my array
while ( $loop->have_posts() ) : $loop->the_post(); $title = get_the_title(); $email = get_field( 'email', get_the_ID() ); $postType = get_post_type(); $obj = get_post_type_object( $postType ); $singularName = $obj->labels->singular_name; $option = $singularName . ' - ' . $title; array_push( $stores, array('value' => $email, 'option' => $option) ); //array_push($values, $email); endwhile;I’ve tried to use one array for the values and one for the options first but it didn’t worked so I tried with a multidimensional array but it doesn’t work either. It display an empty dropdown.
- This reply was modified 8 years, 9 months ago by cocosay.
Forum: Fixing WordPress
In reply to: get_category($category_id)->count; working except for one categoryWell apparently my problem was in the category name. Since I changed it to something without a “‘”, everything works…
Pretty strange but it now works.
Forum: Fixing WordPress
In reply to: get_category($category_id)->count; working except for one categoryI changed my category’s name and slug and it sort of works now, the count displays where it should. But now, when I select this category in my dropdown, it switches language to french for some reason…
Any clues?
Viewing 3 replies - 1 through 3 (of 3 total)