VisualComposer / visual-composer-starter

Visual Composer Starter theme for WordPress designed to be a perfect companion for a simple and good looking website or blog.
https://visualcomposer.com/visual-composer-starter-theme/
GNU General Public License v2.0
134 stars 61 forks source link

Video posts broke WordPress search pages #293

Closed cagdasdag closed 2 years ago

cagdasdag commented 3 years ago

Describe the bug WordPress's search functionality doesn't work correctly when there is a video post in the results.

To Reproduce Steps to reproduce the behavior:

  1. Create a post and choose Video format in WordPress classic editor
  2. Search with classic WordPress search like yourdomain.com/?s=draft
  3. You will see content part seems wrong

Screenshots Screenshot 2021-03-30 at 14 19 15 Screenshot 2021-03-30 at 14 17 18

Additional context The problem is template-parts/content-video.php has the_content and <?php echo esc_html( get_the_content( '', false ) ); ?> which is wrong. Need to remove esc_html part at all. Also if there is a long content something wrong with css because .video-wrapper has height :0. We need to remove this for search pages. It is better to check video posts in any case.