Hallo zusammen,
bin gerade dabei mein Theme (Decent) nach meinen Wünschen anzupassen. Klappt auch alles soweit gut, jedoch komme ich mit einer Sache nicht hin. Ich würde gerne auf der Startseite die neuesten Blogeinträge nebeneinander in 2..3 Spalten anzeigen lassen und danach fortlaufend untereinander. Also quasi so:
Post Post Post
Post Post Post
Post..
Gemeistert habe ich bis jetzt nur die Größe der Beiträge im Stylesheet anzupassen mit diesem Code:
Nun scheitere ich daran die Spalten im Index.php zu erzeugen.
Ich habe mir genug Tut's im web angeguckt und versucht die Kommandozeilen richtig zu positionieren, aber es ändert sich einfach nichts in meinem Layout.
Hier mal meine Index.php
<div id="content-section" class="content-section grid-col-16"> <div class="inner-content-section grid-pct-65">
<?php if( have_posts() ) : ?>
<div class="loop-container-section clearfix">
<?php
// Here starts the loop
while (have_posts()): the_post();
get_template_part('loop', 'archive');
endwhile;
?>
</div><!-- loop-container-section ends -->
<?php decent_archive_nav(); // Calls the 'Previous' and 'Next' Post Links. ?>
<?php else : ?>
<?php decent_404_show(); // Function dedicated for handling empty queries. ?>
<?php endif;?>
</div><!-- inner-content-section ends -->
<?php if($decent_options['site_layout'] != 'no_sidebar') get_sidebar() ?>
</div><!-- Content-section ends here -->
<?php get_footer() ?>
Alles anzeigen
Lösen wollte ich es wie aus diesem Code:
[COLOR=#303336][FONT=Consolas]<?[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]php [/FONT][/COLOR][COLOR=#101094][FONT=Consolas]if[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]([/FONT][/COLOR][COLOR=#303336][FONT=Consolas] have_posts[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]()[/FONT][/COLOR][COLOR=#303336][FONT=Consolas])[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]:[/FONT][/COLOR][COLOR=#101094][FONT=Consolas]while[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]([/FONT][/COLOR][COLOR=#303336][FONT=Consolas] have_posts[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]()[/FONT][/COLOR][COLOR=#303336][FONT=Consolas])[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]:[/FONT][/COLOR][COLOR=#303336][FONT=Consolas] the_post[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]();[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]?>[/FONT][/COLOR][COLOR=#7D2727]<div[/COLOR][COLOR=#E64320]class[/COLOR][COLOR=#303336]=[/COLOR][COLOR=#0F74BD]"post"[/COLOR][COLOR=#7D2727]>[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#303336]<?[/COLOR][COLOR=#303336]php
[/COLOR][COLOR=#858C93]//echo post here[/COLOR][COLOR=#303336]
the_title[/COLOR][COLOR=#303336]();[/COLOR][COLOR=#303336]
the_content[/COLOR][COLOR=#303336]();[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#303336]?>[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#7D2727]</div>[/COLOR][COLOR=#858C93]<!-- close .post div -->[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#303336]<?[/COLOR][COLOR=#303336]php
$counter[/COLOR][COLOR=#303336]++;[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]if[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]$counter [/COLOR][COLOR=#303336]%[/COLOR][COLOR=#7D2727]2[/COLOR][COLOR=#303336]==[/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]{[/COLOR][COLOR=#303336]
echo [/COLOR][COLOR=#7D2727]'<div style="clear:both;"></div>'[/COLOR][COLOR=#303336];[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#303336]}[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#303336]?>[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#303336]<?[/COLOR][COLOR=#303336]php endwhile[/COLOR][COLOR=#303336];[/COLOR][COLOR=#101094]else[/COLOR][COLOR=#303336]:[/COLOR][COLOR=#303336]?>[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#7D2727]<p>[/COLOR][COLOR=#303336]<?[/COLOR][COLOR=#303336]php _e[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]'Sorry, no posts matched your criteria.'[/COLOR][COLOR=#303336]);[/COLOR][COLOR=#303336]?>[/COLOR][COLOR=#7D2727]</p>[/COLOR][COLOR=#303336][FONT=Consolas]<?[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]php endif[/FONT][/COLOR][COLOR=#303336][FONT=Consolas];[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]?>[/FONT][/COLOR]
Alles anzeigen
Leider weiß ich einfach nicht, wo ich bei meinem Code den Counter ect plazieren muss. Habe schon viele Sachen probiert, aber es tut sich Layout technisch einfach nichts.
Kann mir vllt jmd weiterhelfen?
Vielen Dank schonmal für eure Hilfe! ;)
Gruß