Managing shortcode content in HTML content field
-
I am trying to display different HTML content fields based on the output of a calculated field.
Inside this HTML content, I would like to place a Maxbutton. This is a button created with a shortcode as a part of the Maxbuttons plugin.
1. When pasting the shortcode directly into the HTML contnet field, the button does not display.
2. When using <?php echo do_shortcode(‘[maxbutton]’); ?>, the button does not display.
3. When copying the HTML directly that is normally generated by the shortcode, the link and text display, but the button’s styling does not. So we just see a link and text rather than the actual button. This can be fixed by pasting the shortcode somewhere else inside the actual page where the form is displayed. If this is done, both buttons will display properly, for some reason.The button HTML generated by the shortcode looks like this:
<a class="maxbutton-7 maxbutton maxbutton-button" target="_blank" rel="nofollow noopener" href="link">Button text</span></a>
How can I display the button without having to paste it somewhere else on the page?
Thanks.
- The topic ‘Managing shortcode content in HTML content field’ is closed to new replies.