Created
December 27, 2011 15:31
-
-
Save matthiaspabst/1524017 to your computer and use it in GitHub Desktop.
WordPress Shortcode mehrspaltiger Inhalt mit CSS3
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
.multicolumn { | |
-webkit-column-count: 2; | |
-moz-column-count: 2; | |
column-count: 2; | |
-webkit-column-gap: 2em; | |
-moz-column-gap: 2em; | |
column-gap: 2em; | |
} |
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 | |
// 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"); | |
?> |
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
[multicolumn]Hier steht der Inhalt ...[/multicolumn] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Artikel: http://matthiaspabst.de/shortcode-fuer-mehrspaltigen-inhalt-in-wordpress-mit-css3-multi-column/