Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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]
@matthiaspabst

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.