Last active
August 29, 2015 14:21
-
-
Save joshcanhelp/5c31f8aa7194e63582bd to your computer and use it in GitHub Desktop.
Three columns using a shortcode (don't hate)
This file contains 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
function otm_sc_column_wrap ( $atts = array(), $content ) { | |
return '<div class="column-wrap">' . do_shortcode( $content ) . '</div>'; | |
} | |
add_shortcode( 'column_wrap', 'otm_sc_column_wrap' ); | |
function otm_sc_column_3 ( $atts = array(), $content ) { | |
return '<div class="column-3">' . do_shortcode( $content ) . '</div>'; | |
} | |
add_shortcode( 'column_3', 'otm_sc_column_3' ); | |
/* | |
Add this to your content editor: | |
[column_wrap] | |
[3_column] | |
text in first column | |
[/3_column] | |
[3_column] | |
text in second column | |
[/3_column] | |
[3_column] | |
text in third column | |
[/3_column] | |
[/column_wrap] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment