admin管理员组

文章数量:1023086

my site is /answers

am trying to use this code to pull the excerpt (first 33 characters of my post) <?php echo excerpt(33); ?> but it ended up leaving an empty space.

the theme am using is using

my site is http://www.examplaza/answers

am trying to use this code to pull the excerpt (first 33 characters of my post) <?php echo excerpt(33); ?> but it ended up leaving an empty space.

the theme am using is using

Share Improve this question edited Sep 20, 2017 at 10:43 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Sep 20, 2017 at 9:04 Exam GatewayExam Gateway 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 3

Please add below code in theme functions.php

remove_filter( 'the_excerpt', 'wpautop' );

my site is /answers

am trying to use this code to pull the excerpt (first 33 characters of my post) <?php echo excerpt(33); ?> but it ended up leaving an empty space.

the theme am using is using

my site is http://www.examplaza/answers

am trying to use this code to pull the excerpt (first 33 characters of my post) <?php echo excerpt(33); ?> but it ended up leaving an empty space.

the theme am using is using

Share Improve this question edited Sep 20, 2017 at 10:43 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Sep 20, 2017 at 9:04 Exam GatewayExam Gateway 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 3

Please add below code in theme functions.php

remove_filter( 'the_excerpt', 'wpautop' );

本文标签: how to get excerpt without p html tag from wordpress post