placing php or shortcode in Message area of WP-Topbar
-
Hi, I’ve been building some HTML in the “Message” field and I’m trying to place a Gravity form that’s visible on a dropdown menu item but can’t seem to get either the php embed or the shortcode to work.
I tried placing:
echo do_shortcode( ” );
in the PHP Before section, but it doesn’t work. The shortcode just stays as:
[gravityform id=”2″ title=”false” description=”false”]If I place:
<?php echo do_shortcode( "[gravityform id="2" title="false" description="false"]" ) ?>
In the “Message” box, it comes up on the WordPress site as<!--?php echo do_shortcode( "[gravityform id="2" title="false" description="false"]" ) ?-->
If I place that php echo code with the shortcode in the PHP Before section, it loads the form but does it outside of the dropdown menu item box I created, which obviously isn’t what I want.
I feel like I’m missing something basic here, after trying to Google a solution. I am not a developer, just a web designer with CSS skills, if someone could walk me through what I need to do step by step, that would be awesome!
- The topic ‘placing php or shortcode in Message area of WP-Topbar’ is closed to new replies.