WordPress + Masonry = Hilfe!
-
Hallo,
ich werd noch wahnsinnig. Habe jetzt bestimmt sieben Tutorials ausprobiert und es klappt einfach nicht mit dem Masonry im WordPress.HEADER.php
<?php wp_head(); ?> <script> $(function(){ $('#container').masonry({ // options itemSelector : '.item', columnWidth : 240 }); }); </script>
INDEX.PHP
<div id="container"> <div class="item">Lorem ipsum dolor sit amet</div> <div class="item">...</div> </div>
STYLE.CSS
#container { width: 800px;} .item { width: 220px; margin: 10px; float: left; }
FUNCTIONS.php
<?php function mason_script() { wp_enqueue_script( 'jquery-masonry' ); } add_action( 'wp_enqueue_scripts', 'mason_script' ); ?>
So stehen die Beiträge immerhin schon mal nebeneinander, aber es floatet nicht in beide Richtungen. Habt ihr eine Idee?
Ansicht von 2 Antworten – 1 bis 2 (von insgesamt 2)
Ansicht von 2 Antworten – 1 bis 2 (von insgesamt 2)
- Das Thema „WordPress + Masonry = Hilfe!“ ist für neue Antworten geschlossen.