Return String Value in post query loop without or
-
I am really pleased with this plugin. I’m getting a lot of value from it, and I will likely begin using it on multiple sites and pages.
When I embed the Meta Field Block inside a gutenberg query loop, it correctly outputs my meta field. (thanks!) My field is a URL value (https://example.com/wp-content/bookcover.jpg).
I tried using the MFB prefix and suffix to wrap it in html like this:
prefix: <img src=”
suffix: “>
unfortunately, on the front-end everything is wrapped in span tags like this:<span class="is-acf-field is-display-inline-block wp-block-mfb-meta-field-block"><span class="prefix"><img class="alignright" src="</span><span class="value">https://example.com/wp-content/uploads/book-cover.png</span><span class="suffix">” width=”180″ height=”290″/></span></span>
In the “advanced” section of the block settings, I can choose between Div, Span, paragraph, etc. Is it possible to make one of those options “none”, so that I can add my own markup?
I have read all of your other support responses for this plugin, and I believe that you could show me how to add code to my theme to do this, but I am not very good with PHP, and am trying to keep all of my work inside the gutenberg editor. It seems like all of the functionality is already built into the plugin, it’s just a question of markup at this point.
If there is an easier way to do what I’m trying to do, I am very open to that. I’m adding this block to a gutenberg loop on a page that is not using a custom template.
Thanks!
- The topic ‘Return String Value in post query loop without or’ is closed to new replies.