Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello,
If you run the query with the PHP code, does it show posts properly?
$popularpost = new WP_Query(array( 'posts_per_page' => 5, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'meta_value_num', 'order' => 'DESC' ));If yes, it should work in Twig code.
Peter
ModeratorHello Yasmine,
From the line to get the group value
$group_id = rwmb_meta( 'archived_team_users_group','', $post->ID );you can replace the variable
$post->IDwith a real post ID like 123 and see if it works. If yes, there is a problem when getting the post ID above that line. If not, there is a problem when outputting the subfield value. Does that make sense?And the function
print_r()orvar_dump()helps you to output the field value for debugging, it's not a solution.November 14, 2022 at 9:38 PM in reply to: Issues displaying blog post author name and comment counts #39128Peter
ModeratorHello,
The key point here is the post ID or post object, from this line
{% for item in post.post_related %}you have the post object so you can get any post info with the WordPress function. Here are some examples with PHP code, then you can convert it to Twig code on your own.
https://stackoverflow.com/questions/3188901/wordpress-get-author-info-from-post-id
https://wordpress.stackexchange.com/questions/38753/how-to-get-comments-by-post-idPeter
ModeratorHello there,
It is not possible to save the SVG image with string code in the database. This field saves the image ID to the database as you can read on the documentation https://docs.metabox.io/fields/single-image/
If you want to save the image code, please use the field
textareaortextfor this case.November 14, 2022 at 8:29 PM in reply to: ✅Metabox Admin menu does not appear after plugin activation #39125Peter
ModeratorHello Jose,
The flow should be:
- Install and activate Meta Box
- Install and activate other extensions (MB Builder, MB Relationships or just Meta Box AIO ...)
- Activate the license keyThe first step is written down in the Introduction documentation https://docs.metabox.io/introduction/
Meta Box core plugin, which is free and available on wordpress.org. It's the foundation of all features and is always required (activated).You can download other extensions on the My Account page https://metabox.io/my-account/
If you have the Lifetime Bundle license, you can use one plugin Meta Box AIO to get all pro features. Please read more here https://docs.metabox.io/extensions/meta-box-aio/
Peter
ModeratorHello there,
This issue happens when a user submits a form twice or more with Ajax enabled and it has been fixed in the new update. Please update MB extensions to the latest versions, clear all caches and check this issue again.
November 13, 2022 at 10:04 PM in reply to: ✅Metabox Admin menu does not appear after plugin activation #39113Peter
ModeratorHello Jose,
Is the plugin Meta Box activated? All MB extensions need to activate the plugin Meta Box to work.
November 13, 2022 at 10:01 PM in reply to: ✅Function WP_Object_Cache::get was called incorrectly #39112Peter
ModeratorHello Alaan,
Thank you for your feedback. There are some changes in the new version of WordPress 6.1 and it might cause the issue. I will inform the development team to update our plugin to adapt to these changes.
Peter
ModeratorI don't see the error 400 on my end when trying to add some terms Best Season to a post, screen record https://monosnap.com/file/kAw6x5Xk3FOQpLQ0wbVW9fPuTdOpRz
November 13, 2022 at 9:38 PM in reply to: Issues displaying blog post author name and comment counts #39108Peter
ModeratorHello,
On the single post page, no need to use this loop
{% for post in query.posts %}it should be used on the archive page to display posts.
Peter
ModeratorHello,
Can you please deactivate all plugins except Meta Box and MB extensions, switch to a standard theme of WordPress (2022) and recheck this issue? If the quicktags work on the backend, they should work on the frontend also.
Peter
ModeratorHello Lucas,
In case of using Oxygen Builder, WP Grid Builder, please reach out to them if you have any issues with installation, configuration, compatibility, or usage.
Refer to our support policy https://metabox.io/support/topic/support-policy/
Peter
ModeratorHello Michael,
The helper function can help you to output the field value anywhere on the site, the main goal is to pass the field ID and post ID to the function, like this
<?php $value = rwmb_meta( 'my_custom_field', '', $post_id ) ?>You can contact WooCommerce support or your theme support to ask for getting the post ID when using the hook.
November 13, 2022 at 6:08 PM in reply to: ✅Warning: Illegal string offset 'parent' after last update #39103Peter
ModeratorHello Hans,
Then you should contact The Events Calendar support to ask for further assistance. If you experience that issue again, you can enable the WP Debug log and share it here. I will help you to investigate the issue.
Peter
ModeratorHello Mike,
If you want to get the field value, please use the helper function rwmb_meta(), for example
$field = rwmb_meta( 'mh_website_name', ['object_type' => 'setting'], 'site-settings' ); echo ($field);The helper function rwmb_get_field_settings() helps you to get the field settings like name, type, id ..., not the field value.
-
AuthorPosts