Grüßt Euch,
ich möchte bei mir auf der Blog Seite die Artikel nur mit der verlinkten Headline ausgeben, jedoch bekomme ich es einfach nicht hin. Kann mir da bitte jemand helfen ?
PHP
<?php/*
Template Name: Blog Page
*/
/* Fetch Theme Admin Options */
global $options;
foreach ($options as $value) {
if(isset($value['id']) && isset ($value['std']))
if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] );}
}
get_header();
if (is_page() ) {
$page_opts = get_post_meta( $posts[0]->ID, 'page_options', true );
$category = !empty($page_opts['category']) ? $page_opts['category'] : '1';
$post_per_page = !empty($page_opts['post_per_page']) ? $page_opts['post_per_page'] : '10';
}
if ($category) {
if ( get_query_var('paged') ) {
$paged = get_query_var('paged');
}
elseif ( get_query_var('page') ) {
$paged = get_query_var('page');
}
else {
$paged = 1;
}
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
'cat' => $category,
'orderby' => 'date',
'order' => 'desc',
'paged' => $paged,
'posts_per_page' => $post_per_page,
'ignore_sticky_posts' => 1
);
$temp = $wp_query; // Assign orginal query to temp variable for later use
$wp_query = new WP_Query($args);
if( have_posts() ) :
while ($wp_query->have_posts()) : $wp_query->the_post();
$post_opts = get_post_meta( $post->ID, 'post_options', true );
$img = (!empty($post_opts['thumb'])) ? $post_opts['thumb'] : ''; ?>
<div id="post-<?php the_ID();?>" <?php post_class('entry clearfix'); ?> >
<?php if($ind_hide_post_meta != 'true' ) { ?>
<div class="date_card">
<span class="month"><?php the_time( 'M' ); ?></span>
<span class="day"><?php the_time( 'd' ); ?></span>
<span class="year"><?php the_time( 'Y' ); ?></span>
</div>
<div class="post_title">
<h3 class="entry_title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permanent link to %s', 'indus' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h3>
<div class="meta-box"><?php indus_posted_in(); ?></div>
</div>
<span class="clearf"></span>
<?php } // Not hide post meta
else { ?>
<h2 class="entry_title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permanent link to %s', 'indus' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
<?php } // Hide post meta
global $more; $more = 0; the_content( __( 'Read more →', 'indus' ) ); ?>
</div><!-- .entry -->
<?php endwhile; // End the loop
if ( $wp_query->max_num_pages > 1 ) :?>
<?php if ( function_exists( 'wp_pagenavi' ) ) wp_pagenavi();
else {?>
<div class="pagination">
<div class="prev"><?php next_posts_link( __( '← Older Posts', 'indus' ) ) ?></div>
<div class="next"><?php previous_posts_link( __( 'Newer Posts →', 'indus' ) ) ?></div>
</div>
<?php }
endif;
else : ?>
<h2 class="entry-title"><?php _e( 'Not Found', 'indus' ); ?></h2>
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'indus' ); ?></p>
<?php get_search_form();
endif;
$wp_query = $temp; //reset back to original query
} // if ($category) ?>
</div><!-- .content -->
<?php
if ( is_page() ) {
$page_opts = get_post_meta( $posts[0]->ID, 'page_options', true );
$sidebar_opts = isset($page_opts['sidebar_opts']) ? $page_opts['sidebar_opts'] : '';
if ( $sidebar_opts == 'right' || $sidebar_opts == 'none' )
get_sidebar();
}
elseif ( $ind_sidebar == 'right' ) {
get_sidebar();
}
?>
</div><!-- .primary_wrap -->
</div><!-- .primary -->
<?php get_footer(); ?>
Alles anzeigen