Forum Replies Created
-
AuthorPosts
-
March 25, 2022 at 9:12 PM in reply to: ✅get post metabox data inside of MB Block Default Value #35301
Kyle Melton
ParticipantThank you Long!
March 25, 2022 at 9:12 PM in reply to: ✅Default values in clonable group only work on the first item #35300Kyle Melton
ParticipantThank you Long!
January 1, 2022 at 9:35 PM in reply to: ✅Using the value of a switch field in a twig if statement #32956Kyle Melton
ParticipantHi Long,
Thank you for the clarification.
I assumed it had to be a 1 or a 0 because of this part of the documentation:
Data
This field saves the “on” and “off” status in the database as “1” or “0”.Thanks again!
Kyle
Kyle Melton
ParticipantThank you Long.
I will look into that and we can close this thread.
Appreciate your time.
Kyle Melton
ParticipantWill do! Thanks again!
Kyle Melton
ParticipantI just wanted to chime in and confirm we are also experiencing the exact issue shown in the original screenshot regarding the WYSIWYG text mode on our sites as well.
Kyle Melton
ParticipantThank you Long.
Appears to be a conflict with the "Social Warfare Pro" plugin. Looks like it has metabox already wrapped inside of it.
Kyle Melton
ParticipantThank you Long!
Much appreciated!
Kyle Melton
ParticipantPlease disregard my last post. I wound up getting it to work like this:
{% set post = mb.get_post() %} {{ post.product_name }}It renders my custom field on the front end from within a Gutenberg block but it does not show up in the editor. It is just a blank block. Any way to render here for preview?
Kyle Melton
ParticipantThank you for your answer. So if I were to call it in code using the example like this:
{% set post = mb.get_post( 123 ) %} {{ post.post_title }}In my scenario my custom field has a field id of 3168
and my custom field name is product_nameUsing the above code in MB blocks code I could simply call it like this (if I am understanding that correctly):
{% set post = mb.get_post( 3168 ) %} {{ post.product_name }}It appears blank when I test it so I am sure I am missing one small simple piece.
Thanks again for all of your help!
-
AuthorPosts