Forum Replies Created
-
AuthorPosts
-
October 26, 2021 at 9:12 AM in reply to: ✅Conditional items don't appear/disappear until after update #31509
Long Nguyen
ModeratorHi,
The code is very complicated, you can check it in the file conditional-logic.js under the plugin folder.
meta-box-aio/vendor/meta-box/meta-box-conditional-logic/conditional-logic.js
meta-box-conditional-logic/conditional-logic.jsOctober 25, 2021 at 10:30 PM in reply to: ✅Display WP All Import images in image advanced field #31502Long Nguyen
ModeratorHi,
Currently, WP All Import does not support importing the field with setting
'multiple' => truelike theimage_advanced. That means we cannot show the images on both backend and frontend. We are working to create an integration plugin between MB and WP All Import. Hopefully, it will be released soon.Long Nguyen
ModeratorHi Dan,
You can use the plugin Code Snippets to implement some action/filter hooks instead of the file functions.php in the theme/child theme folder.
https://wordpress.org/plugins/code-snippets/Long Nguyen
ModeratorHi Marin,
What's the data that you want to allow the user to edit/delete? If it is the post data that the user submitted, you can use the frontend dashboard shortcode
https://docs.metabox.io/extensions/mb-frontend-submission/#user-posts-dashboardLong Nguyen
ModeratorHi,
You can follow this article to add post meta to the custom route REST API https://blog.abmsourav.com/wordpress-meta-in-rest-api/
For the post meta stored in the custom table, you can follow this topic https://wordpress.stackexchange.com/questions/221808/how-would-i-add-custom-tables-endpoints-to-the-wp-rest-api
Refer to the documentation https://developer.wordpress.org/reference/functions/register_rest_field/
October 25, 2021 at 1:04 PM in reply to: ✅Conditional items don't appear/disappear until after update #31489Long Nguyen
ModeratorHi,
I do not see any issue with your code on my end. Screen record https://share.getcloudapp.com/jkuEKx2n
Please try to deactivate all plugins except Meta Box, MB extensions and switch to the default theme of WordPress (Twenty TwentyOne) to recheck this issue.
October 25, 2021 at 12:56 PM in reply to: ✅If no uploaded document, change the classname in views #31488Long Nguyen
ModeratorHi,
Here is an example to create jQuery code in View https://stackoverflow.com/questions/35845484/using-jquery-with-twig
You can add your own script code in the
<script>tag.October 25, 2021 at 9:20 AM in reply to: ✅Bug: generated PHP code does not include choices callback #31487Long Nguyen
ModeratorHi,
The function must be declared before adding to the builder to use as a callback.
Long Nguyen
ModeratorHi,
Please refer to this topic to get the color picker value in the Oxygen builder https://support.metabox.io/topic/metabox-settings-page-color-picker-css-variables-oxygen/
Long Nguyen
ModeratorHi,
The field
taxonomy_booksis not a possible value of the keyfield. Possible values areterm_id,name,slugorterm_taxonomy_id. Default value isterm_idFollow my previous code to get posts from a specific term
$books = mb_get_block_field( 'taxonomy_books'); $queryBooks = new WP_query(array( 'posts_per_page' => -1, 'post_type' => 'books', 'tax_query' => array( array ( 'taxonomy' => 'book', 'terms' => $books->term_id, 'field' => 'term_id', //optional, default is term_id, just for declaration ) ), ));Please read carefully on the documentation https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters
Regarding the value of taxonomy also display on the frontend, you need to check your template code if there is a line of code that displays the term title.
Long Nguyen
ModeratorHi,
I'm not sure how Oxygen gets the list of post types to show on their end. But on my demo site, it shows post types as well. So you can use the plugin Code Snippets to create the CPTs or contact Oxygen support to ask for help with this case.
Long Nguyen
ModeratorHi,
WordPress itself does not support deleting post meta (field value). You can access the database and run some queries to delete them. Please refer to these topics
https://wordpress.stackexchange.com/questions/38511/delete-posts-based-on-post-meta-data
https://wordpress.stackexchange.com/questions/246684/remove-post-meta-keysLong Nguyen
ModeratorHi Kyle,
It looks like the Meta Box's custom post type is created after Oxygen initiated. You can generate the PHP code and add it to the snippet code to create the CPT with this plugin https://wordpress.org/plugins/code-snippets/
Long Nguyen
ModeratorHi Ole,
There is no option to show View if the post author is the current user. You can create a condition to check the user and show a template, otherwise, show another template.
{% if (check current user) %} show template A {% else %} show template B or redirect to a page {% endif %}Long Nguyen
ModeratorHi Rebecca,
You can add the
sizesetting to the second parameter of the helper shortcode.$image = rwmb_meta( 'state_featured_image', ['object_type' => 'term', 'size' => 'large'], $state->term_id );Please read more here https://docs.metabox.io/fields/single-image/#template-usage
-
AuthorPosts