Last active
December 11, 2016 16:14
-
-
Save mustafix/2be247de168b0bbe8ffc518bfccb80ef to your computer and use it in GitHub Desktop.
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
<?php | |
// function.php | |
function single_shortcode( $atts, $content = null ) { | |
extract( shortcode_atts( array( | |
'title' => '', | |
'des' => '', | |
'category' => '', | |
), $atts ) ); | |
return ' | |
<h4 class="heading">'.$title.'</h4> | |
<p class="content">'.$des.'</p> | |
<div class="row wow animated fadeInDown"> | |
<div class="col-md-12 text-center hero-title"> | |
'.do_shortcode('[t_thumb category=" '.$category.' "]').' | |
'.do_shortcode('[t_content category=" '.$category.' "]').' | |
</div> | |
</div> | |
'; | |
} | |
add_shortcode('s_shortcode', 'single_shortcode'); | |
?> | |
<?php | |
//index.php | |
echo do_shortcode('[s_shortcode title="" des="" category=""]'); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment