Forum Replies Created
-
AuthorPosts
-
JBPH
ParticipantScreencast to show problem:
https://drive.google.com/file/d/1-IUucnTdx8Hm8bMRKbNa39tkZN8z7bDE/view?usp=sharing
JBPH
Participant{ "post_title": "FAQ", "settings": { "slug": "faq", "function_name": "your_prefix_register_post_type", "text_domain": "your-textdomain", "label": "FAQs", "labels": { "name": "FAQs", "singular_name": "FAQ", "add_new": "Add New", "add_new_item": "Add New FAQ", "edit_item": "Edit FAQ", "new_item": "New FAQ", "view_item": "View FAQ", "view_items": "View FAQs", "search_items": "Search FAQs", "not_found": "No faqs found.", "not_found_in_trash": "No faqs found in Trash.", "parent_item_colon": "Parent FAQ:", "all_items": "All FAQs", "archives": "FAQ Archives", "attributes": "FAQ Attributes", "insert_into_item": "Insert into faq", "uploaded_to_this_item": "Uploaded to this faq", "featured_image": "Featured image", "set_featured_image": "Set featured image", "remove_featured_image": "Remove featured image", "use_featured_image": "Use as featured image", "menu_name": "FAQs", "filter_items_list": "Filter faqs list", "filter_by_date": "", "items_list_navigation": "FAQs list navigation", "items_list": "FAQs list", "item_published": "FAQ published.", "item_published_privately": "FAQ published privately.", "item_reverted_to_draft": "FAQ reverted to draft.", "item_scheduled": "FAQ scheduled.", "item_updated": "FAQ updated." }, "description": "", "public": true, "hierarchical": false, "exclude_from_search": false, "publicly_queryable": false, "show_ui": true, "show_in_menu": true, "show_in_nav_menus": true, "show_in_admin_bar": true, "show_in_rest": true, "rest_base": "", "menu_position": 5, "icon_type": "dashicons", "icon": "dashicons-info", "capability_type": "post", "supports": [ "title", "page-attributes" ], "taxonomies": [ "post_tag" ], "has_archive": false, "archive_slug": "", "rewrite": { "slug": "", "with_front": false }, "query_var": false, "can_export": true, "delete_with_user": true }, "post_date": "2023-12-05 06:04:20", "post_status": "publish", "post_type": "mb-post-type" }JBPH
ParticipantHere are the settings:
https://postimg.cc/gnsJ131zJanuary 21, 2024 at 10:42 PM in reply to: custom field WYSIWYG content not displaying with formatting #44361JBPH
ParticipantI'm having exactly the same problem. I am using the WYSIWYG custom field and am outputting via a code block. Anyone find a solution?
February 25, 2023 at 1:03 PM in reply to: ✅Conditionally Hide a Link in a Metabox Vioew if the Custom field is empty? #40724JBPH
ParticipantThat's perfect thanks!
December 30, 2022 at 10:35 PM in reply to: ✅Orderings items from a "Post" custom field using WP_Query #40071JBPH
ParticipantHi Adrien, I have a similar issue and hope you can help?
I also have an advanced Query in Oxygen and I am trying to sort my posts by a custom field I added in Metabox.
I added a number field and have assigned a number to each post. In the query I have tried to do orderby --> data --> and choose the Metabox field but this doesn't work.
Any ideas would be hugely appreciated!
JBPH
ParticipantI updated and also have the same. Please can you provide a bug fix?
WordPress version 6.1.1
Active theme: twentytwentytwo (version )
Current plugin: Meta Box AIO (version 1.16.7)
PHP version 8.1.12Error Details
=============
An error of type E_ERROR was caused in line 111 of the file /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-post-type/src/Edit.php. Error message: Uncaught Error: Class "RWMB_Update_Option" not found in /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-post-type/src/Edit.php:111
Stack trace:
#0 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-post-type/src/Edit.php(24): MBCPT\Edit->is_premium_user()
#1 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-includes/class-wp-hook.php(310): MBCPT\Edit->register_upgrade_meta_box()
#2 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#3 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-admin/includes/meta-boxes.php(1599): do_action()
#5 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-admin/edit-form-advanced.php(271): register_and_do_post_meta_boxes()
#6 /home/874805.cloudwaysapps.com/xmtjedgjaz/public_html/wp-admin/post.php(206): require('/home/874805.cl...')
#7 {main}
thrownDecember 5, 2022 at 10:42 PM in reply to: How to insert custom fields with a dropdown selection? #39513JBPH
ParticipantI have managed to achieve what I wanted using Relationships. Thanks for the responses.
December 5, 2022 at 6:22 PM in reply to: How to insert custom fields with a dropdown selection? #39503JBPH
ParticipantWe organise events and when we do an event we work with many different suppliers or vendors.
After the event if we blog about it we like to add a list of credits at the end of the post mentioning each person or company, what they did and linking to their website.
I have a custom post type called "Real Weddings" - this is the post type where we write the blog posts about the events and need to give credit to the vendors involved.
I have also created the custom post type called "Vendors"
I have created three custom fields for this post type:
Vendor's Role has the id of vendor_role
Vendor's Name has the id of vendor_name
Vendor's Link has the id of vendor_link
Example data for these fields for a vendor would be:
Vendor's Role: Florist
Vendor's Name: Special Flowers
Vendor's Link: there URL goes here
This information would then be displayed on the Real Wedding post template:
Florist: < a href="vendor_link" />Special Flowers
I have created a field group called "Select Vendors for Credit List" and have added a custom field called "Select Vendors".
Field Group id: vendor-credits
Custom field id: select_vendorsFor this field I have chosen the type as checkbox list.
I have set the field to show only on the post type of "Real Weddings".
I want to be able to select the vendors that worked on each event from the checkbox list that will be available on the post type "Real Weddings".Currently I can see on my Real Wedding post type:

NB. The options shows in this screenshot are just dummy data. I have not been able to callback the actual data I require.
So my first questions is:
How do I query the "Vendor" custom post type to retrieve the actual data I need and have it display as the options for my checkbox list?
On the checkbox list custom field it says:
> To use a PHP function that returns an array of options, enter callback: function_name.
> The callback function must be declared before adding to the box.I do not know php at all. So I need help to create a function that queries the "vendor" post type and returns the values correct?
Here is a screenshot of the checkbox list I created. So my understanding is that I need to dynamically populate the 'choices' field.

and secondly:
Would I then be able to use a repeater to query the "Real Wedding" post type and only display the vendors that have been selected as having worked on this event?
Sorry for the double post but couldn't get the images to work first time...
December 5, 2022 at 6:19 PM in reply to: How to insert custom fields with a dropdown selection? #39502JBPH
Participant
December 5, 2022 at 6:12 PM in reply to: How to insert custom fields with a dropdown selection? #39501JBPH
ParticipantWe organise events and when we do an event we work with many different suppliers or vendors.
After the event if we blog about it we like to add a list of credits at the end of the post mentioning each person or company, what they did and linking to their website.
I have a custom post type called "Real Weddings" - this is the post type where we write the blog posts about the events and need to give credit to the vendors involved.
I have also created the custom post type called "Vendors"
I have created three custom fields for this post type:
Vendor's Role has the id of vendor_role
Vendor's Name has the id of vendor_name
Vendor's Link has the id of vendor_link
Example data for these fields for a vendor would be:
Vendor's Role: Florist
Vendor's Name: Special Flowers
Vendor's Link: there URL goes here
This information would then be displayed on the Real Wedding post template:
Florist: < a href="vendor_link" />Special Flowers
I have created a field group called "Select Vendors for Credit List" and have added a custom field called "Select Vendors".
Field Group id: vendor-credits
Custom field id: select_vendorsFor this field I have chosen the type as checkbox list.
I have set the field to show only on the post type of "Real Weddings".
I want to be able to select the vendors that worked on each event from the checkbox list that will be available on the post type "Real Weddings".Currently I can see on my Real Wedding post type:
NB. The options shows in this screenshot are just dummy data. I have not been able to callback the actual data I require.
So my first questions is:
How do I query the "Vendor" custom post type to retrieve the actual data I need and have it display as the options for my checkbox list?
On the checkbox list custom field it says:
> To use a PHP function that returns an array of options, enter callback: function_name.
> The callback function must be declared before adding to the box.I do not know php at all. So I need help to create a function that queries the "vendor" post type and returns the values correct?
Here is a screenshot of the checkbox list I created. So my understanding is that I need to dynamically populate the 'choices' field. Here I have just added some dummy data but I need a function.
and secondly:
Would I then be able to use a repeater to query the "Real Wedding" post type and only display the vendors that have been selected as having worked on this event?
PS. I am using Oxygen Builder.December 3, 2022 at 10:37 AM in reply to: How to insert custom fields with a dropdown selection? #39468JBPH
ParticipantHi Peter, I think I have found another way to achieve what I want. I think I can create a checklist that would allow me to select multiple choices. What I don't understand is how to then retrieve the fields associated with each selection.
So for example:
I have a post type for companies. Each company has three custom fields.
[service] - this is what they do
[company_website] - a url to their webpage
[company_name] - The name of the companyI then add all my companies and create another custom field with a checklist. I see that the checklist has the option to quote:
use a PHP function that returns an array of options, enter callback: function_name.
The callback function must be declared before adding to the box.So I'd like to know how/if it's possible to retrieve my three custom fields for all my posts in the post type 'companies' and display them as a checkbox list.
Once the items are selected they would display on the front end in a list or similar in the format of
[service]: [company_name]
Do you think this is achievable? Many thanks.
JBPH
ParticipantI have actually added the custom field to the category taxonomy using Meta Box AIO. I just need to find a way to add that info to my template in Oxygen Builder.
JBPH
ParticipantI will read those suggestions but I am a consumer and a designer not really a developer so it may be difficult for me. It's a shame Oxygen and Meta Box don't integrate better.
-
AuthorPosts