Forum Replies Created
-
AuthorPosts
-
Ale
ParticipantThanks for your reply Anh.
This are the extensions I use:
// Initialize Metaboxes require get_template_directory() . '/lib/metaboxes/meta-box.php'; // Extensions require get_template_directory() . '/lib/extensions/meta-box-builder/meta-box-builder.php'; require get_template_directory() . '/lib/extensions/meta-box-group/meta-box-group.php'; require get_template_directory() . '/lib/extensions/meta-box-columns/meta-box-columns.php'; // Create metaboxes require_once('metabox-works.php');I've updated all earlier today with same result.
Versions:
metabox 4.15.6
builder 2.9.4
group 1.2.16
columns 1.2.3Ale
ParticipantThis is the metabox: https://ghostbin.com/paste/mc5bj
Ale
ParticipantThis is the rest of the message:
reorderSelected http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:13:3 update http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:40:3 each http://colorale.local/wp-admin/load-scripts.php:2:2879 each http://colorale.local/wp-admin/load-scripts.php:2:844 <anonymous> http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:53:31 i http://colorale.local/wp-admin/load-scripts.php:2:27444 fireWith http://colorale.local/wp-admin/load-scripts.php:2:28213 ready http://colorale.local/wp-admin/load-scripts.php:2:30004 K http://colorale.local/wp-admin/load-scripts.php:2:30366November 1, 2018 at 3:29 PM in reply to: ✅select advanced in Group showing: "Warning : Invalid argument supplied foreach" #11813Ale
ParticipantThank you for fixing it!
October 22, 2018 at 6:54 PM in reply to: ✅select advanced in Group showing: "Warning : Invalid argument supplied foreach" #11707Ale
ParticipantThanks
October 20, 2018 at 2:31 PM in reply to: ✅select advanced in Group showing: "Warning : Invalid argument supplied foreach" #11691Ale
ParticipantThanks so much Anh, I didn't know that groups will affect how to display fields on the website.
Now works very well.One more thing is that when adding multiple keys/values to select advanced the Metabox Builder does not create an array but a unique value, if I input the following on the options field:
Red: red
Yellow: yellow
Blue: blueThe Buuilder creates this and not an array:
'options' => 'Red: red Yellow: yellow Blue: blue',Ale
ParticipantAre contexts still not working for Gutenberg?
Thanks!Ale
ParticipantThank you very much Anh! That did the job!
Ale
Participantrwmb_the_value returns an unordered list if more than one is selected. Is the a way to return as an array only?
Ale
ParticipantThanks ANh.
You are right about not translating both.
Thanks for the link to rwmb_the_value.A way I found was to use esc_html__ for each array item:
<?php $valueArray = rwmb_meta( 'mb_languages', array( 'multiple' => true) ); $pieces = array(); foreach ($valueArray as $item) { $pieces [] = esc_html__( $item, $domain = 'yanse' ); } echo implode(', ', $pieces); ?>Ale
ParticipantForgot to subscribe to replies...
Ale
ParticipantSorry, my mistake. It is working, what is not possible is to find items in a second query taht shows the fields, I will solve it. Thanks!
Ale
ParticipantThanks Anh,
I'm not sure why it isn't working but when I add the code from the tutorial to my functions.php it simply doesn't change the results at all.
If I add teh following code, then the search is broken and I can't find anything at all.
add_action( 'pre_get_posts', function( $query ) { if ( is_admin() || ! $query->is_main_query() ) { return; } $query->set( 'meta_query', [ 'relation' => 'OR', [ 'key' => 'mb_someidused', 'value' => '"' . get_search_query() . '"', 'compare' => 'LIKE' ] ] ); } ); -
AuthorPosts