Skip to content

Instantly share code, notes, and snippets.

@matthiaspabst
Created December 27, 2011 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthiaspabst/1524017 to your computer and use it in GitHub Desktop.
Save matthiaspabst/1524017 to your computer and use it in GitHub Desktop.
WordPress Shortcode mehrspaltiger Inhalt mit CSS3
.multicolumn {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-gap: 2em;
-moz-column-gap: 2em;
column-gap: 2em;
}
<?php
// Shortcode für mehrspaltigen Inhalt mit CSS3, functions.php
function content_multicolumn($atts, $content = null) {
if(!empty($content)){
return do_shortcode('<div class="multicolumn">' . $content . '</div>');}
return '<div class="multicolumn">' . $content . '</div>';
}
add_shortcode("multicolumn", "content_multicolumn");
?>
[multicolumn]Hier steht der Inhalt ...[/multicolumn]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment