在後台編輯文章時,回車幾次添加空行。發表後再看,卻沒有空行。
3 N- s1 b1 j5 \& m7 w9 o7 o在網上搜索了方法。1 B( E8 r7 ^0 }; @" D1 b
: S2 U( b' @& e+ f$ {在模板的single.php文件,6 y% E0 R, d7 n/ Y) w' u, e8 o
查找到 <?php the_content(); ?>
+ G# q u. E8 _8 G$ U2 @. {修改成<div class=」post-content」>) a2 w# E( u3 j6 i+ o) V3 d
<?php the_content(); ?>' `/ O; n; i! x' t
</div>
5 v2 t. S6 y( B [' @- H/ R. E- J8 x
但是我用的contango模板,沒找到<?php the_content(); ?>,該怎麼處理,請大蝦指點+ @1 ~" \6 H+ ^! V4 u! D: G* ]
貼出single.php如下- n I2 v3 T7 W/ y# `2 `
! R5 K2 _6 V& N6 d6 r
6 o( b* m2 H! R* r* e1 k) Q) L, x
<?php get_header(); ?>' s6 x: |6 n. h' Y4 t `
) j! U' z" F6 l<div id="content" class="site-content clearfix">
! U d$ y* O, ]1 L/ D1 R3 P/ u8 `6 |( o- H& H3 t
<?php get_template_part( 'loop-meta' ); ?># ?" ~$ E" t* S/ f3 W' @0 V. x
3 h2 ^0 {1 b% z& P- \
<div class="container_16 clearfix">8 d/ m0 D( c+ n0 G/ N
' g+ [( t- c$ j
<div class="grid_11">
1 P3 V; U- N0 P4 l ( T1 G) o7 V% L# p5 _
<div id="primary" class="content-area">( I" Y: Y5 M% \/ _" u( c
<main id="main" class="site-main" role="main">
, _2 Z% f" y* [2 _" v; B0 o & B/ r, o" j& k: \+ r' }
<?php contango_breadcrumbs(); ?>
I, W7 e$ |4 m+ O l8 J! ?4 j5 I% U
<?php if ( have_posts() ) : ?>
+ C7 _" k( p; W+ s' s% L
! ]$ W6 b6 l, t6 D- f8 |% a <?php while ( have_posts() ) : the_post(); ?>) r. h1 f* ?5 v$ C% `
# x8 T- j; u0 z: I! B+ M <?php get_template_part( 'content', 'single' ); ?>
& {% [- O. Z, J' i+ W- A8 b+ \ - L% i& v" K: \: P: K, b
<?php endwhile; ?>
. @; |$ i# x7 T& J% p+ b 8 _' J- a: s6 [2 b
<?php else : ?>
`8 n+ `0 X6 Z' q# `9 `( h% [2 W ) t* m' {1 d r+ p& M, [5 O* q
<?php get_template_part( 'loop-error' ); ?>& P0 l1 V) N3 e4 n
9 @0 | ^) D% Z' \" L4 O' w <?php endif; ?>
* G: ]# W% y5 G& K. }5 Y 5 t9 i' M9 S5 p/ Y. S9 r
<?php contango_loop_nav_singular_post(); ?>- _( [' x* [8 D& B* u9 D
+ V8 M( C; p) Z! b& A7 t </main><!-- #main -->/ x4 Z! D, [$ r y$ g( A7 l. R7 u) ~
</div><!-- #primary -->9 x1 F- j8 f( U# [
& [- W* G! l3 K; C8 B0 O3 |
</div> <!-- end .grid_11 -->
$ m- V" o( ?3 S: { & S* N- y% z8 s
<?php get_sidebar(); ?>' s$ `; Z* d+ g. U: z6 Q! ?/ @
: {/ W1 v: j- S. Y8 ~: ^) v, } </div> <!-- end .container_16 -->; |9 D; z, u' q
4 K( F9 i7 ]9 ?9 i A+ S+ Q
</div><!-- #content -->
% s& ?! X0 t1 { 3 i. J9 D! b0 K
<?php get_footer(); ?>
$ _/ |' e5 l# h S( ~
& u/ H2 r/ `# B7 A+ P
1 g# M {% A0 X4 \$ X5 w3 I: e
. Y$ s g6 z& Z0 R; B+ F6 k' U3 J |