Created
July 18, 2010 21:44
-
-
Save slambert/480736 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
/* Render a block of text into two columns. Code from http://css3generator.com/ KBKB */ | |
/* Enclose the block of text in opening and closing shortcodes; */ | |
/* It's best to put the shortcodes on their own line so paragraphs break properly */ | |
/* [maketwocolumns]your multi-paragraph text here[/maketwocolumns] */ | |
/* Works best on long passages and isn't smart enough to avoid orphans/widows */ | |
.maketwocolumns { | |
-moz-column-count: 2; | |
-moz-column-gap: 20px; | |
-webkit-column-count: 2; | |
-webkit-column-gap: 20px; | |
column-count: 2; | |
column-gap: 20px; | |
} | |
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 to functions.php | |
// Make two columns: Render a block of text into two columns | |
function wpf_maketwocolumns($atts, $content = null) { | |
return '<div class="maketwocolumns">' . $content . '</div>'; | |
} | |
add_shortcode("maketwocolumns", "wpf_maketwocolumns"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment