Forum Replies Created
-
AuthorPosts
-
August 13, 2025 at 1:31 AM in reply to: Envira Gallery Pagination Not Working in Metabox Custom Field #48693
saint
ParticipantHi Peter,
No problem, thank you for your reply. I just tried both suggestions:
1.) For the Textarea, it doesn't seem to have any effect and had the same result.
GIF: https://share.zight.com/nOuOelmQ
2.) For the Custom HTML area, I added the shortcode in there as well - however, I couldn't find a way to display that on the frontend.
It was added to the Custom HTML area in the Custom Fields group settings/config, but I didn't see it in the CPT record itself, or was able to find a way to output that out.
Given that Envira support was able to properly render the gallery directly, but once in a Metabox field it breaks, I suspect something in the output process of a metabox field is interrupting this process?
August 1, 2025 at 3:57 AM in reply to: Envira Gallery Pagination Not Working in Metabox Custom Field #48631July 24, 2025 at 4:11 AM in reply to: Envira Gallery Pagination Not Working in Metabox Custom Field #48607saint
ParticipantHi Peter,
Thanks for your note. Actually, I started this thread after working with Envira support because it appears the pagination for the Envira gallery shortcode, when added to a normal page looks fine.
But when added in a Metabox custom field, that is when it displays the abnormal behavior.
That's why I went ahead and created this ticket. Do you know if there's something that Metabox adds to it's custom fields that may be causing conflict with their gallery?
Thank you.
August 14, 2024 at 4:34 PM in reply to: Lock SLUG From Changing when Updating Singular Name of CPT or CT #46148saint
ParticipantThank you Peter! That would be wonderful.
saint
ParticipantOk, great! Thank you Peter.
June 29, 2024 at 1:43 AM in reply to: ✅Display Content of Shortcode in WYSIWYG Field on Frontend #45768saint
ParticipantAs an addendum: They are aware of this issue and will likely address it in one of the upcoming releases.
June 29, 2024 at 1:43 AM in reply to: ✅Display Content of Shortcode in WYSIWYG Field on Frontend #45767saint
ParticipantHi Peter,
Thank you for your help! A quick update for you and for others that may stumble upon this when running into the same situation.
From what I understand, in Bricks Builder, the issue is that all dynamic tags will be sanitized before using on an element.
The workaround to have a form shortcode render from a Metabox WYSIWYG field on the frontend when using Bricks Builder is:
add_filter( 'wp_kses_allowed_html', function( $tags, $context ) { if ( ! isset( $tags['form'] ) ) { $tags['form'] = [ 'data-id' => true, 'id' => true, 'class' => true, ]; } return $tags; }, 100, 2 );Can add this filter as a code snippet and it should render the output correctly. I've tested this in production and can confirm the solution works.
June 28, 2024 at 5:43 AM in reply to: ✅Display Content of Shortcode in WYSIWYG Field on Frontend #45755saint
ParticipantHi Peter,
Sure, I've updated the site to reflect your feedback.
Re: #1 -
$value = rwmb_meta( 'mb_resource_resource_offer_cta_box' ); echo do_shortcode( wpautop( $value ) );Is now added to
content-single.phptemplate for TwentyTwentyOne.https://share.zight.com/8LuNYO9D
When I added:
[rwmb_meta id="resource_offer_cta_box"] Post Content Here.to Post Content, I see:Frontend: https://share.zight.com/v1u9WpLY
Backend: https://share.zight.com/04u8vXLWRe: #3 - Yes, it is a custom field of the current post.
June 26, 2024 at 2:12 AM in reply to: ✅Display Content of Shortcode in WYSIWYG Field on Frontend #45721saint
ParticipantHi Peter,
Thanks for your reply. I've tried the above suggestion, but may be implementing it incorrectly? Here are the steps I took:
1. Activated and switched over to the Twenty-Twenty Two theme, then added the code into the functions.php file:
https://share.zight.com/BluvbvAq2. De-activated all plugins except Metabox, Classic Editor, and a form plugin for testing purposes
3. Added the helper shortcode into the Post Content area of the test record in the backend:
https://share.zight.com/8LuNqNAX4. This is what I saw on the frontend:
https://share.zight.com/xQuoRJlj5. Tested with a form plugin shortcode for a side-by-side comparison:
https://share.zight.com/Kouk98d96. Frontend with MB and form plugin shortcode:
https://share.zight.com/qGubqn5ZCould there be a step I missed during the implementation?
June 25, 2024 at 8:46 AM in reply to: ✅Display Content of Shortcode in WYSIWYG Field on Frontend #45703saint
ParticipantOther attempts tried:
1) [rwmb_meta id="mb_resource_resource_offer_cta_box" render_shortcode="true"]
2) {echo:resource_form_sc}<?php add_filter( 'rwmb_get_value', function( $value, $field, $args, $object_id ) { if ( 'wysiwyg' === $field['type'] ) { $value = do_shortcode( $value ); } return $value; }, 10, 4 ); ?><?php function offer() { $value = rwmb_meta( 'mb_resource_resource_offer_cta_box' ); echo do_shortcode( wpautop( $value ) ); } ?><?php $value = rwmb_meta( 'mb_resource_resource_offer_cta_box' ); echo do_shortcode( wpautop( $value ) ); ?><?php echo do_shortcode( 'mb_resource_resource_offer_cta_box' ); ?>saint
ParticipantSame here, can MB support provide some insight into how this can be achieved? Typically I've included shortcodes inside a WYSIWYG and displayed them with no issues, but not sure how to best approach this in Metabox.
March 14, 2024 at 3:22 PM in reply to: ✅Get Fields from Records in a Reciprocal Relationship of a Related Post #44852saint
ParticipantThank you, Peter!
That worked perfectly. I was under the impression that I could just pull back from field name since it is looping through the same reciprocal CPT, but will make sure to check the loop name next time and output from there.
As an aside, in trying to make this query a little more efficient, and easier to execute through the UI, I tried out different combinations and got the below to work.
{% set relationship = attribute( relationships, 'software-cpt-and-software-alternatives-cpt' ) %} {% for post in relationship.from %} <h2>Software: {{ post.title }}</h2> {% set software_reciprocal_args = { post_type: 'software', relationship: {id: 'software-cpt-reciprocal-relationship', from:post.ID} } %} {% set software_reciprocals = mb.get_posts ( software_reciprocal_args ) %} {% for software_reciprocal in software_reciprocals %} <h4>Software_reciprocal: {{ software_reciprocal.post_title }}</h4> {% endfor %} {% endfor %}But is there any way for me to use the Queries in the INSERT FIELDS button in lieu of the below:
{% set software_reciprocal_args = { post_type: 'software', relationship: {id: 'software-cpt-reciprocal-relationship', from:post.ID} } %} {% set software_reciprocals = mb.get_posts ( software_reciprocal_args ) %} {% for software_reciprocal in software_reciprocals %} <h4>Software_reciprocal: {{ software_reciprocal.post_title }}</h4> {% endfor %}If possible, I'd like to get rid of having to manually setting up the second args statement to get to the final nested loop just so I don't get a chance to mess things up by entering typos or setting the from/to direction wrong, etc.
Thank you!
March 9, 2024 at 4:23 AM in reply to: ✅Get Fields from Records in a Reciprocal Relationship of a Related Post #44776saint
ParticipantHi Peter,
Thank you for your reply. I read through the link, plus the reference link in that thread and redid the logic.
For the most part, it looks like the nested views is working. Except when I got to the Reciprocal Relationship resultset.
After getting to that View, the records I pull back from that Relationship is the same title of the related record all 3 times, when I was expecting the titles of the 3 records selected in that Reciprocal Relationship.
Backend setup in the Reciprocal Relationship: https://share.zight.com/WnuXXDgD
MB View code: https://pastebin.com/aNY9TtWm
Frontend result: https://share.zight.com/KouKK16qCould I be missing something that's making it repeat itself?
February 4, 2024 at 12:46 PM in reply to: ✅How to reuse previously created custom field in multiple groups? #44474saint
ParticipantHi, following up on this to see if this is doable in the latest version?
saint
ParticipantHi Long,
Thanks for the note, as I'm relatively new to Metabox and making the switch to be more "developer-ish", is there a video tutorial on how to do this with Oxygen? I'd love to be able to do all of these, but the documentation isn't as useful to me at this point as I don't really have much of an "end-to-end" view of how it all fits together and I'm still a relatively new developer.
Can you help provide a more interactive step-by-step view perhaps? Would be greatly appreciated - for this scenario and other future ones as well. I learn much better this way, and can start adopting Metabox to use if I can better know how.
Thanks much.
-
AuthorPosts