Hallo,
ich habe jetzt dasselbe noch mal mit Schlagworten gebaut. Das funktioniert leider nicht, wenn das Schlagwort ein Leerzeichen enthält. Hat jemand eine Idee?
PHP
<?php /* Template Name: Standardtemplate+Schlagwort */ ?>
<?php get_header(); ?>
<div id="wrap" class="container clearfix">
<section id="content" class="primary" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post();
get_template_part( 'content', 'page' );
endwhile;
endif; ?>
<?php query_posts('tag='.get_the_title().'&posts_per_page=10&paged='.get_query_var('paged')); ?>
<?php if (have_posts()) :
echo "<hr>";
echo '<h2 id="category-title" class="archive-title">';
printf(__('Tag Archives: %s', 'dynamicnewslite'), '<span>' . get_the_title() . '</span>');
echo "</h2>";
while (have_posts()) : the_post();
get_template_part( 'content', $theme_options['posts_length'] );
endwhile;
endif; ?>
<?php comments_template(); ?>
</section>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
Alles anzeigen
Danke und Gruß Martin