Ich versuch seit Stunden krampfhaft eine statische Site zu generieren auf der unter dem static content noch die neusten Blogposts aus einer Kategorie "News".
Eine Möglichkeit dies zu realisieren habe ich gefunden.
Allerdings werden aus den Posts nurdie Texte angezeigt, keine Bilder bzw den von mir eingebundenen Content.
Die statische Site sieht so aus:
der Code für die Posts ist mit
gekeinzeichnet.
PHP
<?php get_header(); ?>
<div class="art-contentLayout">
<div class="art-content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<h2 class="art-PostHeader">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a>
</h2>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__('F jS, Y', 'kubrick')) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><?php _e('Author', 'kubrick'); ?>: <?php the_author_posts_link() ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<div class="art-PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
<?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<div class="cleared"></div>
<?php ob_start(); ?>
<?php $icons = array(); ?>
<?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="" />
<?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostFooterIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<?php $metadataContent = ob_get_clean(); ?>
<?php if (trim($metadataContent) != ''): ?>
<div class="art-PostMetadataFooter">
<?php echo $metadataContent; ?>
</div>
<?php endif; ?>
</div>
<div class="cleared"></div>
</div>
</div>
<?php comments_template(); ?>
<?php endwhile; endif; ?>
<!--beginn post -->
<div class="art-Post">
<div class="art-Post-body">
<h1><u>Aktuelles</u></h1>
<br />
<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name=news&showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
<?php endwhile; ?>
</div>
</div>
<!--------endpost----->
</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
</div>
<div class="cleared"></div>
<?php get_footer(); ?>
Alles anzeigen
Der content den ich gerne auf der startseite sehen würde ist unter dem Punkt "Blog" auf der Seite zu finden -> http://www.tangente-verlag.de/web
Ich hoffe Ihr könnt mir helfen den gesamten Blogcontent auf der Startseite anzuzeigen.
Ich weiß derzeit nicht wo mein Fehler liegt.
Danke
Torsten