I am trying to use a shortcode in the single.php file of my theme that allows me to display text inside a box that is generated by the shortcode. What I want to do is make it display the excerpt for each post inside that box.
Here is the shortcode for the box as it's displayed on my site:
<?php echo do_shortcode('[box type="tick" style="rounded" border="full"]<center><h3><b>The Offer</b></h5></center>[/box]'); ?>
Here's an example of it in use on my site: (it's the greenbox with the rounded corners)
http://imediaprofits.com/directory/listing/bar-1/
When I place the php code for the excerpt into the shortcode, it does not display. Here is what I tried to do to get the excerpt to display inside the shortcode:
<?php echo do_shortcode('[box type="tick" style="rounded" border="full"]<center><h3><b>The Offer</b></h5></center><?php the_excerpt(); ?>[/box]'); ?>
The excerpt that should be pulled and placed into the box is displayed just below the box on the example page I listed above. It says "Free cover between 7pm and 9pm." I want that to display inside that box to draw attention to it and make it easy for visitors to see.
Can anyone tell me how to get it to display the way I want it to? I'm not sure if I'm doing something wrong, or if what I'm trying is just not possible.
Thanks,
Mike