最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

how to get excerpt without p html tag from wordpress post

matteradmin5PV0评论

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' );
Post a comment

comment list (0)

  1. No comments so far