0 %

Removing Paragraph Tags from the_excerpt(), Properly

Removing Paragraph Tags from the_excerpt(), Properly

You may have Googled “How to remove the p tags from the_excerpt()” or some variation and read through a bunch of results. There are some fancy workarounds, such as a stripping them out and even a plugin. While these workarounds may still work, you probably should look to use a much more simple solution.

Simply Echo WordPress’ get_the_excerpt()


excerptremovep

You can echo WordPress’ great function get_the_excerpt that returns the value to output the data like so:

<?php echo(get_the_excerpt()); ?>

This will return the the excerpt for you without the paragraph tags, properly. I’ve had to use this several times and it works beautifully. If you have any questions please comment below.

Việt Lâm Coder

Việt Lâm Coder

Senior Fullstack & System Architect

Cần hỗ trợ website? Gọi / Zalo 0944.71.4545.

Trao đổi về dự án của bạn!

VietLamCoder CMS — Nền Tảng Quản Trị Flat-File Siêu Tốc LamWeb.com.vn — Hệ Sinh Thái Thiết Kế Web & Kho Giao Diện 2026