Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterThank you Jackky! I will update the docs and check the JS issue.
Anh Tran
KeymasterHi Jackky, I see you have several fields with the same ID
front_cat. That breaks the functionality of the plugin, even it’s toggled by the Conditional Logic. You need to change the field IDs to make sure each field has an unique ID. Then the condition will work.Anh Tran
KeymasterHi Sergey, can you please post your code here?
January 14, 2017 at 6:14 PM in reply to: How to automatically replace text/url's in wp_postmeta #4795Anh Tran
KeymasterHi, the job of search and replace URL in the database is very common while migrating a WordPress site. You can do that in many ways in general, not specific for Meta Box by using:
WordPress search and replace tool: this tool is one of the best tool to do this job with GUI
WP-CLI
search-replacecommand provides a same way to do that with command line. If you’re using Windows, you might want to follow this tutorial to install WP-CLI on Windows.Both tools allow you search and replace a string in the whole database or in a specific table (wp_postmeta).
Anh Tran
KeymasterHi, the checkbox saves value as 1 or 0. To make it checked by default, just set the
stdto1.Anh Tran
KeymasterHi, currently the position of the new clone is hardcoded in
meta-box/js/clone.jsfile as you can see here:The group extension doesn't change this behavior.
For now, the only way to change that is changing the code directly.
I'm thinking about adding a new option to Meta Box to reposition the "Add New" button and the position of the new clone.
Anh Tran
KeymasterOh, sorry. I didn’t notice this is for MB Builder.
To add subfields to a group in the Builder, just drag fields to be a child item of the group item (think like you drag and drop the sub menu in the Appearance > Menus).
Anh Tran
KeymasterJust think "group" is a special field. The only difference is it has
fieldsparameters, which is an array of fields. This is a sample code:$meta_box = array( ’title’ => ’Test’, 'fields' => array( // Group array( 'id' => 'group_id', ’type’= > 'group', // Subfields 'fields' => array( array( 'id' => ’text', ’type’ => ’text’, ’name’ => ’Text’, ), // Other subfields go here ), ), ), );Anh Tran
KeymasterHi Yumikom,
Maybe the theme or the plugin you're using has a call to the function "rwmb_meta()" when the Meta Box plugin is not loaded (or activated). It's better to change the code to:
if ( function_exists( 'rwmb_meta' ) ) echo rwmb_meta( 'field_id' );If your field is a simple field (like text or textarea), you should use
get_post_meta(), like this:echo get_post_meta( get_the_ID(), 'field_id', true );rwmb_meta()is just a wrapper ofget_post_meta. Usingget_post_metamight give you a better performance.Anh Tran
KeymasterTo support Yoast SEO plugin, please install this extension. It works well with the Tabs extension.
Anh Tran
KeymasterThe WYSIWYG field doesn't output the "p" tag by default. It can be done using the "wpautop" function like this:
echo wpautop( rwmb_meta( 'field_id' ) );Anh Tran
KeymasterHi, I see you missed the param
clonefor the group field, so it can't be cloned.Here is the fixed code (I fixed the syntax also):
title: Prazos fields: - name: Group id: grop_name type: group fields: - name: Group id: group_1 type: group clone: true fields: - name: test id: test type: text - name: test1 id: test1 type: text - name: test2 id: test2 type: textAnh Tran
KeymasterHi, I've just added an upgrade message and buttons in the profile page. Please go to "My Account" (link on the top right or click on your avatar) and upgrade.
Please let me know if you need anything else.
Anh Tran
KeymasterHi, can you show me the code to create meta boxes?
-
AuthorPosts