Created
August 26, 2016 11:34
-
-
Save musamamasood/6feadfa0045b7f6f34ba3e0791238916 to your computer and use it in GitHub Desktop.
Using HTML in a Shortcode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Shortcode | |
function nebco_bannerboxes() { | |
/* Turn on buffering */ | |
ob_start(); ?> | |
<div class="box first-box hvr-top hvr-underline-from-center"> | |
<hr class="vertical"> | |
<h4>THE NEBCO</h4><h4>STORY</h4> | |
<a href="#"> | |
<p class="et_pb_button butt custum-butt">READ MORE</p> | |
</a> | |
</div> | |
<div class="box second-box hvr-top hvr-underline-from-center"> | |
<hr class="vertical"> | |
<a href="#"> | |
<h4>COMMERCIAL RISK</h4> | |
<h4>MANAGEMENT</h4> | |
<p class="et_pb_button butt custum-butt">READ MORE</p> | |
</a> | |
</div> | |
<div class="box third-box hvr-top hvr-underline-from-center"> | |
<hr class="vertical"> | |
<hr class="vertical-right"> | |
<a href="#"> | |
<h4>PERSONNEL RISK</h4> | |
<h4>MANAGEMENT</h4> | |
<p class="et_pb_button butt custum-butt">READ MORE</p> | |
</a> | |
</div> | |
<?php | |
/* Get the buffered content into a var */ | |
$content = ob_get_contents(); | |
/* Clean buffer */ | |
ob_end_clean(); | |
/* Return the content as usual */ | |
return $content; | |
} | |
add_shortcode( 'bannerboxes', 'nebco_bannerboxes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment