Forum Replies Created
-
AuthorPosts
-
November 5, 2021 at 9:52 PM in reply to: ✅PHP Block generated from Builder not rendering in editor or front end. #31758
Matt V
ParticipantHi Long. Thanks for your response. I guess I got my hopes up that I'd be able to build my MB Twig blocks into a plugin. I'll think about whether to go the PHP route or to just build in Builder and export/import to new sites with JSON.
I know this is a separate question, but as long as I have you here... If I build several blocks in Builder, is there a way to batch export/import them all into a new site? Or would I need to do so one at a time?
Matt V
ParticipantI see. For whatever reason, making a new view does seem to work. Thanks for the tip.
I'll know to check that next time, but that's definitely not how I expected it to work. And from my testing, it's a pretty consistent bug.
Thanks for your time. Have a nice day/night.
Matt V
ParticipantHi Long,
Here is how I'm testing this:
- I spun up a LocalWP site with WP 5.8.1 and installed MB 5.4.8 and MB AIO 1.15.2.
- I created a View with a simple H1 and set it to
Type: Singular,
Location: All Singular,
Render for: only the post content,
Position: Before the post content
View the Hello World post. The H1 test appears as expected.
- Switch the Location from All Singular to Post.
View the Hello World post. The H1 test is not there.
Screencast of the last part here: https://cln.sh/wwrzoW
The Site Health comes up clean as far as the REST API goes:
https://cln.sh/KWYlGXThank you as always for your time.
Matt V
ParticipantThanks, Long. That's helpful to know. I'll ask the Timber folks.
Matt V
ParticipantThanks for the reply, Long. It makes sense to me that the different versions might conflict in unexpected ways.
Deactivating Timber does fix the issue, but then I lose the other functionality.
Is there a way to scope/namespace/prefix the MB Twig usage?
I found an issue on the Timber repo showing how another plugin handled a similar conflict. I don't know enough about MB development to know whether that would be appropriate or even possible.
October 20, 2021 at 4:56 AM in reply to: ✅Youtube link in post.content doesn't render in a MB view #31403Matt V
ParticipantHi there,
I've been troubleshooting YouTube embeds for much of the afternoon, and I finally narrowed it down to MB Views and found this post.
I don't know exactly how WP handles these embeds on the frontend, but is there a way to load or replicate the necessary script through Views, either as an HTML script tag or in the JS panel?
I know my content editors are going to be using this embed functionality regularly, so I would love to find a way to give them a simple embed block rather than using an HTML block.
Should I expect that this issue will be true with the rest of the embed blocks?
Matt V
ParticipantThanks for the suggestion, Long. You're right, with selects and maybe some creative conditionals, I could probably replicate most of that functionality. I'll give that some thought.
Matt V
Participant+1 for this. It does make custom MB blocks seem a bit clumsy next to blocks from other libraries.
Matt V
ParticipantThanks, Long. I see how
is_previewworks now.What I hear you saying is that MB Builder does not yet have a way to set the block setting
preview, so it is not possible to generate the small preview with Builder. And if that is important enough, we should code the block in MB Blocks instead.Did I get that right?
Matt V
ParticipantHi Long. Thanks for your help.
When you say that I should use the code to show the block preview, what is the syntax for that? Is that where I’d use
is_preview? -
AuthorPosts