Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorLet me know if you have any questions.
Long Nguyen
ModeratorHi,
The shortcode in step 1 should have the attribute
post_typeto let the dashboard shortcode knows what post type would be edited.[mb_frontend_form post_fields="title,content" post_type="cpt-slug"]Long Nguyen
ModeratorHi,
You need to wrap the code in a function, just like
function my_custom_function() { $value = rwmb_meta( 'checkout-form-shortcode' ); echo do_shortcode( wpautop( $value ) ); }apply the function with the plugin Code Snippets or code block as you want. Then show the field value with PHP Function Return Value.
Long Nguyen
ModeratorHi Igor,
To get the post "Diário de Obra" that has the ID of a post "Equipamentos", you can use the meta query. Here are some guides for you by using PHP code:
- Get the ID of the current "Equipamento" by using the function get_queried_object_id()
- Query to get the post "Diário de Obra" and metadata. Get more details on the documentation https://developer.wordpress.org/reference/classes/wp_query/#custom-field-post-meta-parameters
$args = array( 'post_type' => 'Diário-de-Obra-slug', //change the CPT slug 'meta_key' => 'field_post_id', //change the field post ID 'meta_value' => get_queried_object_id(), 'meta_compare' => '=', ); $query = new WP_Query( $args );In the loop, you can show the post title and any post meta of the post "Diário de Obra".
Long Nguyen
ModeratorHi,
Can you please deactivate the plugin Oxygen and re-check the archive page with a theme? And please share all your screen include the page URL.
Long Nguyen
ModeratorHi Stefano,
Thank you for your feedback.
I will escalate this case to the development team to cover this issue in the next update.
Long Nguyen
ModeratorHi Zenjukai,
Thank you for reaching out.
I've tested the
dateFormatsetting again and see it displays on the frontend as the format on the backend. Can you please share the code that creates the custom field and show it on the frontend?You can use the option
Get PHP Codein the Builder to generate the code https://docs.metabox.io/extensions/meta-box-builder/#getting-php-codeLong Nguyen
ModeratorHi Nuno,
If you use the Validate
date, it will apply thedate methodof jQueryValidation to validate the input value, you can find here https://jqueryvalidation.org/date-method/. That means the date input format should bemm/dd/yyormm-dd-yy. Refer to this article https://www.w3schools.com/js/js_date_formats.aspSo I recommend removing the validation when using the field type
date, the user also cannot type any text to the input box.Long Nguyen
ModeratorHi,
Because the Frontend Dashboard page needs the page has the shortcode Frontend Submit available. So we can do this trick to combine the Frontend Dashboard with your premium plugin while that plugin does not support editing posts on the frontend.
May 1, 2021 at 8:36 AM in reply to: ✅Using rwmb_filter_id_value for cloned grouped sub fields #27800Long Nguyen
ModeratorHi,
Yes, it the default behavior of Block editor when we use the PHP code to do something. The data was modified but it does not show until refreshing the page. You can try to use the Classic editor, after clicking update, the page also reloads.
Long Nguyen
ModeratorHi,
Please move the container tag outside the loop, just like
<div class="container"> {% set relationship = attribute( relationships, 'book-photographer' ) %} {% for post in relationship.to %} ... {% endfor %} </div>Long Nguyen
ModeratorHi,
The field
postor the Relationship saves the post ID in the database so the filter of Facet shows the post ID as the data value. You can contact Facet support to ask to display the post title base on the post ID in the filter.Long Nguyen
ModeratorHi,
The extension MB Frontend Submission only allows the users to edit their posts (author) on the frontend. If your premium plugin creates posts and assigns the author to the customers who make a purchase, you can create two pages:
- One has a frontend form shortcode https://docs.metabox.io/extensions/mb-frontend-submission/#creating-post-forms
- One has the dashboard shortcode https://docs.metabox.io/extensions/mb-frontend-submission/#user-posts-dashboardThen you can show the dashboard page for users to edit their posts on the frontend.
Long Nguyen
ModeratorHi Chris,
This can be done via PHP code. Here are some guides for you
- Get post terms by using the function wp_get_post_terms()
- Get term meta base on the term ID returned https://docs.metabox.io/extensions/mb-term-meta/Long Nguyen
ModeratorHi,
You can use the flexbox to show pictures next to each other. Get more details here https://css-tricks.com/snippets/css/a-guide-to-flexbox/
-
AuthorPosts