youtube videos stripped from post grid even using Advanced Excerpt function
-
This was reported already here but the solution wasn’t ideal because the suggested code actually prints the output directly and returns nothing. This can give the semblance of things working properly depending on setup, but it actually prints the content of the excerpt generated by Advanced Excerpt outside the designated container
div.uagb-post__text.uagb-post__excerpt
(and this can lead to weird display/CSS stuff).
I tried amending the suggested code by callingthe_advanced_excerpt()
the correct way as seen here:add_filter('uagb_single_post_excerpt_grid', function($excerpt, $id, $attr) { return the_advanced_excerpt( '', true ) ; },10, 3 );
This fixed the output so it goes inside the proper
div.uagb-post__text.uagb-post__excerpt
, but this caused videos to go missing again.After some debugging, I found that the output while in my hook above does contain the iframe with the YouTube video, but it gets stripped from output before printing on the page.
I have nothing else on my site that would alter the output of the excerpt, and I’ve switched to default themes to double-check, so this leads me to believe that Spectra is further refining output of the excerpt without giving us any option to turn it off. I looked at your docs but I also don’t see a way to programmatically disable further filtering.
- The topic ‘youtube videos stripped from post grid even using Advanced Excerpt function’ is closed to new replies.