我想在single.php中如何在Wordpress中为第2页,第3页等应用不同的样式?
使用不同的造型为其他页面我使用这个标签分开我的博客文章分为几个网页:
<!--nextpage-->
我如何在WordPress的做到这一点?
感谢
我想在single.php中如何在Wordpress中为第2页,第3页等应用不同的样式?
使用不同的造型为其他页面我使用这个标签分开我的博客文章分为几个网页:
<!--nextpage-->
我如何在WordPress的做到这一点?
感谢
如果你看看你的源代码,为其他页面(2,3等),你会看到有添加到<body>
标签叫paged-2
,paged-3
等新类
您可以基于这些新类应用您自己的CSS样式,这只会影响这些页面。
如何,这
我在single.php中PHP是
<?php get_header();?>
<main>
<?php get_sidebar() ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post">
\t <div class="top-single-movie">
\t <div class="info"> \t
<h3 class="title" id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark">
\t \t \t <?php the_title(); ?></a>
\t \t \t <?php if(get_field('date')): ?>
\t (<?php the_field('date'); ?>)
<?php endif; ?> \t
\t \t \t </h3>
\t \t \t </div>
\t \t \t
\t \t \t
<?php if(has_post_thumbnail()) :
the_post_thumbnail('medium');
else :
echo '<img src="'.get_bloginfo('template_directory').'/img/default.png">';
endif;
?>
\t \t \t
\t \t \t </div><!-- End. top-single-movie -->
\t \t \t
<?php the_content(); ?>
\t \t \t
\t \t \t <?php
\t wp_link_pages(array(
\t \t 'before' => '<div class="page-link"><span>' . __('Pages:', 'tl_back') . '</span>',
\t \t 'after' => '</div>'
\t));
?>
\t \t \t
\t \t \t <?php include (TEMPLATEPATH . '/php/single/tv-single-rand.php'); ?>
\t \t \t
\t \t \t
\t \t \t </div><!-- End. content-single-movie -->
\t \t
<p class="tags"><?php the_tags(); ?> </p>
<!--?php comments_template(); // Get comments.php template ?-->
<?php endwhile; else: ?>
<p> <?php _e('Sorry, no posts matched your criteria.'); ?> </p>
<?php endif; ?>
<!-- END Loop -->
<ul class="navigationarrows">
<li class="previous">
<?php previous_post_link('« %link'); ?>
<?php if(!get_adjacent_post(false, '', true))
{ echo '<span>«Previous</span>'; } ?>
</li>
<li class="next">
<?php next_post_link('%link »'); ?>
<?php if(!get_adjacent_post(false, '', false)) { echo '<span>Next post:</span>'; } ?>
</li>
</ul><!-- end . navigationarrows -->
</div>
</main>
<?php get_footer();?>
我认为你需要为这个问题添加更多详细信息是一致的。 – Jeff
是我的问题是如何写,对不起,我不能很好的speack英语 – alam7o
这是在Wordpress? – Lee