Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Maria,
Meta Box supports adding value for custom fields in the backend and outputting the value on the frontend. Creating a filter (search bar) on the frontend is beyond the scope support of Meta Box. However, you can follow these articles to create your own custom code to do that https://metabox.io/?s=filter&post_type=post
Long Nguyen
ModeratorHi Lee,
This issue has been fixed. Please read more on the documentation (scroll down to the bottom) https://docs.metabox.io/functions/rwmb-set-meta/
or use the MB Custom Table API
addorupdateto set or update the field value. Read more on the documentation https://docs.metabox.io/extensions/mb-custom-table/#addLong Nguyen
ModeratorHi,
On my demo site, the code works as well. Please check this screen record https://monosnap.com/file/rSsSyJXUFeFwrbxhfr4rnvhfxmX6Mr
Long Nguyen
ModeratorHi,
Here is an example View code to query posts by multiple terms
{% set args = { post_type: "post", posts_per_page: 5, tax_query: { "relation": "AND", 0: { taxonomy: "category", field: "slug", terms: "aciform" }, 1: { taxonomy: "category", field: "slug", terms: "cat-a" } } } %} {% set posts = mb.get_posts( args ) %} {% for post in posts %} {{ post.post_title }} {% endfor %}Long Nguyen
ModeratorHi,
Please use the property
post_typeto get the post type of a post object.Post type: {{ post.post_type }}Read more on the documentation https://developer.wordpress.org/reference/classes/wp_post/
Long Nguyen
ModeratorHi,
I've issued you a full refund. Let me know if you have any questions.
Long Nguyen
ModeratorHi,
Please follow this topic to set the post title by a custom field value https://support.metabox.io/topic/adding-metabox-field-data-to-the-post-title/#post-34115
Read more on the documentation https://docs.metabox.io/actions/rwmb-after-save-post/
Long Nguyen
ModeratorHi,
Currently, the extension MB Beaver Builder Integration does not support getting subfield value in a group. You can create a shortcode to display the subfield value. Then you can insert the shortcode anywhere with the page builder. Refer to this documentation https://docs.metabox.io/extensions/meta-box-group/#outputing-group-with-page-builders
July 12, 2022 at 10:42 AM in reply to: using php to display a list of custom posts and custom fields #36925Long Nguyen
ModeratorHi,
If you are using the helper function
rwmb_meta()in a custom loop (not in the post template), please add the post ID to the third argumentrwmb_meta( 'course', '', 123 )where 123 is the post ID. Please read more on the documentation https://docs.metabox.io/functions/rwmb-meta/
Long Nguyen
ModeratorHi,
You still need to assign the post type for the taxonomy in Meta Box > Taxonomies > Edit a taxonomy > Post Type tab.
It is the default behavior of WordPress because the taxonomy is registered later than the post type and the object type (post type) is required to register the taxonomy. Please read more on the documentation
https://developer.wordpress.org/reference/functions/register_post_type/#taxonomies-2
https://developer.wordpress.org/reference/functions/register_taxonomy/Long Nguyen
ModeratorHi,
For multiple locations, you can use an array of IDs
'object_ids' => [123, 456, 789]But it does not support getting the location IDs from the field
postwith post typelocationabove in real-time like working with JavaScript code.Long Nguyen
ModeratorHi,
For Google Maps, you can load the library by following this documentation https://developers.google.com/maps/documentation/javascript/places
I will also inform the Marketing team to create an article for displaying all listings on Google Maps.
Long Nguyen
ModeratorHi,
You can change the value of argument
object_idsto alocationpost ID and recheck this issue. For example:'object_ids' => 123,Long Nguyen
ModeratorHi,
It is not possible. The extension MB Frontend Submission support creating posts with custom fields in the frontend only. I will inform the development team to consider supporting this case in future updates.
Long Nguyen
ModeratorHi,
Can you please share the code that creates the field group used with the extension MB Frontend Submission? Please note that this code used PHP code to register the field group, it does not work like the View with Twig code so the argument
object_idsvaluepost.IDwon't work in this case.For the second question, the view works like a template to output the field value. It is possible to create a custom form with View but not possible to add the fields from the Insert Field tab.
-
AuthorPosts