Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterAh, I see. Probably a bug with the Show/Hide extension. I will fix it to support "live" change.
January 25, 2016 at 9:49 AM in reply to: Bought all extensions do I still add MB to functions? #2193Anh Tran
KeymasterHi,
That's not 100% true.
As you already bought all extensions, you have the MB Builder extension which allows you to create meta boxes and custom fields with UI. You don't need to code if you use it.
You also don't need to code if you use free extensions: MB Custom Post Type or MB Custom Taxonomy.
Other extensions require you to add custom code to your themes/plugins. Please follow the documentation of each extension for more details.
Anh Tran
KeymasterI see. In this specific case, the new post hasn't been a child yet, so both
excludeandhidecouldn't detect that. So the rules couldn't work.I will think more about this specific case between add new post and edit an existing post. This probably is the same as this problem.
Anh Tran
KeymasterHi,
Are you using both
excludeandhideat the same time? Ifexcluderule is there, then meta box is not outputted in the page and thus, thehiderule doesn't work.Anh Tran
KeymasterYes, it is. You need to set the
'std' => 1.January 21, 2016 at 9:17 AM in reply to: โ Include/Exclude for new/existing posts - Not saving data #2175Anh Tran
KeymasterHi ClementN,
You can use Conditional Logic in this case. Just add
'visible' => array('original_post_status', '!=', 'publish'),When you want to show meta box when post is not published, and vice versa.
In case you want to show post on specify post status like
publish,draft... just put the original status to the value of conditional logic, like so:'visible' => array('original_post_status', 'auto-draft'),For example:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $meta_boxes[] = array( 'title' => 'Media', 'visible' => array('original_post_status', '!=', 'publish'), 'fields' => array( array( 'name' => 'URL', 'id' => 'tanurl', 'type' => 'text', ), ) ); return $meta_boxes; } );Best regards
Tan Nguyen
Anh Tran
KeymasterHi,
There is no options for date formatting. The value users set in the admin area when editing the post is the value you will get and show via the shortcode. If you want to change the format of the displayed date, you have to write the code yourself.
Anh Tran
KeymasterNo, they aren't. These fields are used to show content in the meta boxes only.
Anh Tran
KeymasterThis field type allows you to create a group of text fields. For example you want to store info of a book author with Name, Address, Email, you can define a field set text like in this demo. When getting value with
rwmb_meta, you will receive anarray( 'name' => '...', 'address' => '...', 'email' => '...' ).It's similar to group extension but less flexible.
Anh Tran
KeymasterYes, if field is empty, then the meta is removed for that post to keep the database clean.
Anh Tran
KeymasterYou can use this simple code:
$post_id = isset( $_GET['post'] ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : false );Anh Tran
KeymasterNice solution. This is not supported by the plugin by default and it's nice to know that can be solved with another solution.
Anh Tran
KeymasterThe
Textfield hasautocompleteattribute which you can choose from the list or enter custom value. You can check that field ๐Anh Tran
KeymasterThe order you register meta boxes is the order of them when you see. But if you have changed their order by drag and drop them manually, then that order will be saved and used in the future. In that case you need to reorder them manually again.
Anh Tran
KeymasterI was able to test your full code with the FTP details you just sent. However, it looks right in my localhost:

So strange :(. Can you check again, or please send me the URL of your website so I can have closer look?
-
AuthorPosts