Thread Starter
eknip
(@eknip)
Sorry that’s not my question/problem. I understand that it’s frustrating to see questions that seem quite simple to find a solution for.
My question however is if there is a WordPress function, [em]something like get_oembed_code()[/em], that I can use inside my theme that will return the correct embed code.
As I mentioned before, I’m doing a custom SQL query to select the latest blogposting that contains a youtube url inside the ‘post_content’ column. After that I filter the actual URL from $result->post_content.
So basically I want to create an oembed code from the URL, possibly outside the loop. Why? Because I think it’s nice to make proper themes that still use as much of WordPress’ features as possible.
Thanks!