Hallo!
Ich weiß, dass dieses Thema schon x mal hier im Forum besprochen wurde...jedoch habe ich immer noch ein paar Fehler auf die ich nicht komme.
Bis jetzt klappt es die Beiträge aus Kategorie x auf der Seite y anzuzeigen...jedoch sieht das nicht sehr schön aus.
1. Der Text von dem Beitrag steht unschön neben dem Titel des Beitrags.
2. Nach dem Beitrag ist der Rand weg und es ist so ein hässlicher weißer Rand zu sehen.
3. Wie kann ich die Beiträge ohne diese Liste anzeigen? Also dass auf der Seite nur die Beiträge zu sehen sind, wie auf der Startseite.
Beitrag 1
(preview)text 1
Beitrag 2
(preview)text 2
und zu guter letzt Punkt 4: Wie blende ich die Kategorie x dann auf der Startseite aus?
Der Link zu meinem Blog: http://himbrr.de.vu
Es handelt sich um die Seite "Tutorials"
Ich hoffe ihr könnt mir helfen :)
Hier ist der Text des Templates:
<?php
/*
Template Name:Kategorie
*/
?>
<?php get_header(); ?>
<div id="content">
<ol>
<?php
$posts = get_posts('numberposts=30&category=27&order=ASC&orderby=post_title');
foreach($posts as $post) :
setup_postdata($post);?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ol>
</div></div>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Thanks Kubrick for this code ?>
<?php if (is_category()) { ?>
<div class="page-title">
<h2 class="page-title-border"><?php _e('Archive for'); ?> <?php echo single_cat_title(); ?></h2>
</div>
<?php } elseif (is_day()) { ?>
<div class="page-title">
<h2 class="page-title-border"><?php _e('Archive for'); ?> <?php the_time('F j, Y'); ?></h2>
</div>
<?php } elseif (is_month()) { ?>
<div class="page-title">
<h2 class="page-title-border"><?php _e('Archive for'); ?> <?php the_time('F, Y'); ?></h2>
</div>
<?php if (is_page('71')) { // ID der gewünschten Seite ?>
<ul>
<?php
$posts = get_posts('category=27&numberposts=6');
foreach($posts as $post) :
setup_postdata($post);
?>
<li><?php the_time(__('d.m.:')) ?><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a>.</li>
<?php endforeach; ?>
<li></li></ul>
<?php } ?>
</div>
<?php } elseif (is_year()) { ?>
<div class="page-title">
<h2 class="page-title-border"><?php _e('Archive for'); ?> <?php the_time('Y'); ?></h2>
</div>
<?php } elseif (is_author()) { ?>
<div class="page-title">
<h2 class="page-title-border"><?php _e('Author Archive'); ?></h2>
</div>
<?php } elseif (is_search()) { ?>
<div class="page-title">
<h2 class="page-title-border"><?php _e('Search Results'); ?></h2>
</div>
<?php } ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="title">
<h2 class="posttitle">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permalink to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<p class="postmeta">Posted on <?php the_time('M d, Y') ?> under <?php the_category(', ') ?> | <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments'), 'commentslink', __('Comments are off')); ?> <?php edit_post_link(__('Edit'), ' · ', ''); ?>
</p>
</div>
<div class="postentry">
<?php if (is_search()) { ?>
<?php the_excerpt() ?>
<?php } else { ?>
<?php the_content(__('Read the rest of this entry »')); ?><div style="clear:both;"></div>
<?php } ?>
</div>
<!--
<?php trackback_rdf(); ?>
-->
</div>
<?php endwhile; ?>
<div class="pages">
<div class="pages-border"></div>
<span class="page-previous"><?php posts_nav_link(' ', '', __('« Older Entries')); ?></span>
<span class="page-next"><?php posts_nav_link('', __('Newer Entries »'), ''); ?></span>
</div>
<?php else : ?>
<div class="post">
<h2><?php _e('Error 404 - Not found'); ?></h2>
</div>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen