Hallo,
ich hab ein kleines Problem mit einem neu erstellten Seiten Template.
Ich möchte hier erst einen Statischen Text ausgeben und dann die Beiträge einer bestimmten Kategorie.
Das habe ich soweit auch hinbekommen, wahrscheinlich zwar auf einem nicht so elegantem weg da ich mich mit PHP nicht so auskenne. Aber es funktioniert wenigstens.
Bis darauf das die Sidebar nicht rechts an der Seite angezeigt wird sondern unter dem Content.
Kann mir jemand von euch helfen ?
Hier ist der Code:
PHP
<?php/** * Template Name: Handball-Blog mit Text * The template file for Handball - Blog. * @package HappenStance * @since HappenStance 1.0.0*/
get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="content-headline"> <h1 class="entry-headline"><span class="entry-headline-text"><?php the_title(); ?></span></h1><?php happenstance_get_breadcrumb(); ?> </div>
<?php happenstance_get_display_image_page(); ?> <div class="entry-content"><?php the_content(); ?><?php wp_link_pages( array( 'before' => '<p class="page-link"><span>' . __( 'Pages:', 'happenstance' ) . '</span>', 'after' => '</p>' ) ); ?><?php edit_post_link( __( 'Edit', 'happenstance' ), '<p class="edit-link">', '</p>' ); ?> <?php endwhile; endif; ?> </div>
<?php query_posts('cat=5&showposts=5');?><h1 class="entry-headline"><span class="entry-headline-text"><?php if(get_theme_mod('happenstance_latest_posts_headline', $happenstance_defaults['happenstance_latest_posts_headline']) == '') { ?><?php _e( 'Latest Posts' , 'happenstance' ); ?><?php } else { echo esc_html(get_theme_mod('happenstance_latest_posts_headline', $happenstance_defaults['happenstance_latest_posts_headline'])); } ?></span></h1> <br />
<section class="home-latest-posts<?php if (get_theme_mod('happenstance_post_entry_format', $happenstance_defaults['happenstance_post_entry_format']) == 'Grid - Masonry') { ?> js-masonry<?php } ?>"><?php if (have_posts()) : while (have_posts()) : the_post(); ?><?php if (get_theme_mod('happenstance_post_entry_format', $happenstance_defaults['happenstance_post_entry_format']) == 'Grid - Masonry') {get_template_part( 'content', 'grid' ); } else {get_template_part( 'content', 'archives' ); } ?><?php endwhile; endif; ?> </section> <?php happenstance_content_nav( 'nav-below' ); ?>
<?php if (get_theme_mod('happenstance_display_sidebar_archives', $happenstance_defaults['happenstance_display_sidebar_archives']) != 'Hide') { ?><?php get_sidebar(); ?><?php } ?>
<?php get_footer(); ?>
Schon mal danke an euch.