Hallo,
mein erster Beitrag hier und ich hoffe ich halte mich an alle Regeln, falls nicht, sagt mir bitte Bescheid.
Ich habe zwar bereits einen ähnlichen Beitrag hier gefunden, der mir aber leider nicht weiterhilft.
Auf dem Blog: http://www.neverendingchaos.deversuche ich seit Tagen bei den Postbereichen der jeweiligen Kategorien, die Posts nebeneinander anstatt untereinander anzeigen zu lassen. Es soll eben so aussehen, wie man es zur Zeit auf vielen Blogs findet: Kleines Artikelbild, Eingangstext, Read more und das ganze eben nebeneinander.
Hier die Loop.php:
PHP
<?php
/**
* Template for generic post display.
* @package themify
* @since 1.0.0
*/
// Enable more link
if ( ! is_single() ) {
global $more;
$more = 0;
}
?>
<?php themify_base_post_before(); // hook ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<?php themify_base_post_start(); // hook ?>
<?php themify_base_before_post_image(); // Hook ?>
<?php if ( has_post_thumbnail() ) : ?>
<figure class="post-image">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
</a>
</figure>
<?php endif; // has post thumbnail ?>
<?php themify_base_after_post_image(); // Hook ?>
<div class="post-content">
<time datetime="<?php the_time('o-m-d') ?>" class="post-date"><?php echo get_the_date( apply_filters( 'themify_loop_date', '' ) ) ?></time>
<?php themify_base_before_post_title(); // Hook ?>
<h1 class="post-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h1>
<?php themify_base_after_post_title(); // Hook ?>
<?php if ( ! is_attachment() ) : ?>
<p class="post-meta">
<span class="post-author"><?php the_author_posts_link(); ?></span>
<?php the_terms( get_the_ID(), 'category', ' <span class="post-category">', ', ', '</span>' ); ?>
<?php the_tags( ' <span class="post-tag">', ', ', '</span>' ); ?>
<?php if ( comments_open() ) : ?>
<span class="post-comment">
<?php comments_popup_link( __( '0 Comments', 'themify' ), __( '1 Comment', 'themify' ), __( '% Comments', 'themify' ) ); ?>
</span>
<?php endif; //post comment ?>
</p>
<!-- /.post-meta -->
<?php endif; ?>
<?php if ( is_singular() ) : ?>
<?php the_content(); ?>
<?php else: ?>
<?php $entry_content_display = themify_base_get( 'setting-default_archive_content', 'full' ); ?>
<?php if ( 'full' == $entry_content_display ) : ?>
<?php the_content(); ?>
<?php elseif ( 'excerpt' == $entry_content_display ) : ?>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php endif; ?>
<?php edit_post_link(__('Edit', 'themify'), '<span class="edit-button">[', ']</span>'); ?>
</div>
<!-- /.post-content -->
<?php themify_base_post_end(); // hook ?>
</article>
<!-- /.post -->
<?php themify_base_post_after(); // hook ?>
Alles anzeigen
Und hier die index.php
PHP
<?php
/**
* Template for common archive pages, author and search results
*
* @package themify
* @since 1.0.0
*/
?>
<?php get_header(); ?>
<!-- layout -->
<div id="layout" class="pagewidth clearfix">
<!-- content -->
<?php themify_base_content_before(); //hook ?>
<div id="content" class="clearfix">
<?php themify_base_content_start(); //hook ?>
<?php
/////////////////////////////////////////////
// Author Page
/////////////////////////////////////////////
if ( is_author() ) : ?>
<?php
$author_url = esc_url( get_the_author_meta( 'user_url' ) );
/**
* Filter the size of the author avatar.
*
* @since 1.1.0
*
* @param int $size The avatar height and width size in pixels.
*/
$author_avatar_size = apply_filters( 'themify_base_author_avatar_size', 48 );
$author_name = get_the_author_meta( 'user_firstname' ) . ' ' . get_the_author_meta( 'user_lastname' );
if ( ' ' == $author_name ) {
$author_name = get_the_author_meta( 'display_name' );
}
?>
<div class="author-bio clearfix">
<p class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ); ?>
</p>
<h2 class="author-name"><?php printf( __( 'About %s', 'themify' ), $author_name ); ?></h2>
<?php if ( $author_url != '' ): ?>
<p class="author-url">
<a href="<?php echo $author_url; ?>"><?php echo $author_url; ?></a>
</p>
<?php endif; //author url ?>
<div class="author-description">
<?php the_author_meta( 'description' ); ?>
</div>
<!-- /.author-description -->
</div>
<!-- /.author bio -->
<h2 class="author-posts-by"><?php printf( __( 'Posts by %s:', 'themify' ), $author_name ); ?></h2>
<?php endif; ?>
<?php
/////////////////////////////////////////////
// Search Title
/////////////////////////////////////////////
if ( is_search() ): ?>
<h1 class="page-title"><?php _e( 'Search Results for:', 'themify' ); ?>
<em><?php echo get_search_query(); ?></em>
</h1>
<?php endif; ?>
<?php
/////////////////////////////////////////////
// Category Title
/////////////////////////////////////////////
if ( is_category() || is_tag() || is_tax() ): ?>
<h1 class="page-title"><?php single_cat_title(); ?></h1>
<?php echo themify_base_get_category_description(); ?>
<?php endif; ?>
<?php
/////////////////////////////////////////////
// Loop
/////////////////////////////////////////////
if ( have_posts() ) : ?>
<!-- loops-wrapper -->
<div id="loops-wrapper" class="loops-wrapper">
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( is_search() ): ?>
<?php get_template_part( 'includes/loop', 'search' ); ?>
<?php else: ?>
<?php get_template_part( 'includes/loop', 'index' ); ?>
<?php endif; ?>
<?php endwhile; ?>
</div>
<!-- /loops-wrapper -->
<?php get_template_part( 'includes/pagination' ); ?>
<?php else : ?>
<?php
/////////////////////////////////////////////
// Error - No Page Found
/////////////////////////////////////////////
?>
<p><?php _e( 'Sorry, nothing found.', 'themify' ); ?></p>
<?php endif; ?>
<?php themify_base_content_end(); //hook ?>
</div>
<?php themify_base_content_after(); //hook ?>
<!-- /#content -->
<?php
/////////////////////////////////////////////
// Sidebar
/////////////////////////////////////////////
get_sidebar(); ?>
</div>
<!-- /#layout -->
<?php get_footer(); ?>
Alles anzeigen
Ich hoffe, ihr könnt mir helfen. Ich brauch wirklich eine Idiotensichere Erklärung. DANKE :neutral::wink: