Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterSorry guys, I've fixed the plugin but forgot to update the version on metabox.io, so the Updater doesn't work. Please try it again, it should be ok now.
Anh Tran
KeymasterHello, can you describe the steps you get the bugs 2 and 3?
February 5, 2018 at 11:25 AM in reply to: MB Relationships - Updating when MB Updater is active breaks this extension #8453Anh Tran
KeymasterHi John,
The problem with the Updater is fixed. It's in the metabox.io system.
Regarding the stuffs in the admin list, yes, those are suggested. We also have Admin Columns plugin and I'll think a best way to do that.
Anh Tran
KeymasterYes, you can. After getting group value, you can sort sub-groups using a custom function, like this:
$group = get_post_meta( get_the_ID(), 'football_league_table_option', true ); usort( $group, function ( $a, $b ) { $score_a = $a['football_team_win_stat']; $score_b = $b['football_team_win_stat']; if ( $score_a == $score_b ) { return 0; } return ( $score_a > $score_b ) ? - 1 : 1; } ); $counter = 0; // other codeFebruary 5, 2018 at 10:38 AM in reply to: ✅Drag and drop reordering will be hidden the content #8450Anh Tran
KeymasterHello, what content did you mean? Is it hidden when cloning or after cloning? Can you take a screenshot?
February 2, 2018 at 6:06 PM in reply to: post_id in hook rwmb_frontend_after_process is missing #8434Anh Tran
KeymasterHello, I've just added submitted post ID to the
$configvariable. Please update the plugin.February 1, 2018 at 2:56 PM in reply to: Prevent sortable nested group being able to be moved outside of its parent. #8424Anh Tran
KeymasterHi, I tried that and couldn't replicate the bug. Here is what I have:
Can you try again?
Anh Tran
KeymasterHi, currently it's not possible. You can show/hide the whole field only 🙁
Anh Tran
KeymasterHi,
I think the problem comes from how you get the custom field data for categories. Basically, this loop:
foreach ( $cats as $cat ) { $term_id = $cat->term_id; }makes
$term_idis always the ID of the last category. No matter how many categories, it always get the last category.That's why you always see the same data. Please take a look at that.
February 1, 2018 at 11:57 AM in reply to: after update latest version of metabox plugin facet wp extension seems down.. #8420Anh Tran
KeymasterOops, I've just fixed it in version 1.0.1. Please update.
January 31, 2018 at 2:27 PM in reply to: Prevent sortable nested group being able to be moved outside of its parent. #8411January 31, 2018 at 2:13 PM in reply to: ✅MB Relationships - Using each_connected multiple times #8410Anh Tran
KeymasterNo problem. Here is the code for registering relationships:
add_action( 'mb_relationships_init', function () { MB_Relationships_API::register( array( 'id' => 'posts_to_pages', 'from' => 'post', 'to' => 'page', ) ); MB_Relationships_API::register( array( 'id' => 'posts_to_posts', 'from' => 'post', 'to' => 'post', ) ); } );And here is the code to fetch connections (in
index.phpfile):global $wp_query; MB_Relationships_API::each_connected( array( 'id' => 'posts_to_pages', 'from' => $wp_query->posts, 'property' => 'connected_pages', ) ); MB_Relationships_API::each_connected( array( 'id' => 'posts_to_posts', 'to' => $wp_query->posts, 'property' => 'connected_posts', ) );Here is the code in the
content.phpfile:foreach ( $post->connected_pages as $post ) : setup_postdata( $post ); the_title(); endforeach; wp_reset_postdata(); echo '<hr>'; foreach ( $post->connected_posts as $post ) : setup_postdata( $post ); the_title(); endforeach; wp_reset_postdata();Anh Tran
KeymasterHi, the problem is your post field ID. On the editing screen, the
#postis used for the post form, so you can't use IDpost. You need to change the ID of the post field.Then, you can hide the group if the field is null with this condition:
'hidden' => array( 'post2', '=', '' ), // post2 is post field ID.PS: Please renew your license to get updates of extensions and support.
Anh Tran
KeymasterWe’ve just realized this problem and we’re working this.
PS: It's fixed in the version 1.2.2. Please update.
January 29, 2018 at 11:15 AM in reply to: ✅How to add a custom id to the "rwmb-meta-box" wrapper #8383Anh Tran
KeymasterHi UG,
1. If that's the case, then you can use the
idautomatically created by WordPress. Each meta box will have a unique ID the same as the ID settings. See this screenshot:https://imgur.elightup.com/yP1KjMq.png
2. I've seen the issues with the code. No need screenshot anymore. I will check and fix it asap.
3. I've checked and seen the fields appear before
.edit-tag-actions. Here is how it appears on my side:https://imgur.elightup.com/M7XcDOv.png
PS: To upload the screenshot, you can use this app: https://getsharex.com/. It auto uploads images to imgur.com after taking screenshots. Then just paste the image URL here.
-
AuthorPosts