简体   繁体   中英

Search results not showing full post, only excerpt (Wordpress)

this is my first time posting on this site so apologies if the question isn't totally appropriate but I'm building a portfolio site for my brother who is a composer and he needs his music library to be able to be checkbox filter-able. The problem is that when I conduct a search with filters, the results show only the excerpt, and not the audio player like I need.

Library page displaying the full posts with audio player

Search results page showing just the post title and nothing else

Also, excuse the sheer crudeness of the site. I just started it this morning... Thanks in advance!

To show the full content you have to use the_content function, in your search.php file replace the following

<?php the_excerpt(); // partial content ?>

with

<?php the_content(); // full content ?>

Also remember. the_excerpt function strips out all HTML tags so it could be a problem, you can read this article .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM