WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How Can Oembed Auto-Detect & Display Video on Index Pages (2 posts)

  1. openwp3
    Member
    Posted 1 year ago #

    Hello. I've read a few previous topics on this, but none seem to fully resolve this issue. I'm interested in using the Post Format and Oembed features to automatically "discover" video links and display those videos on Index listings. I already know using the_content will do this, but I don't want any of the text or shortcodes associated with the post, to show up, only the video. I've looked at includes/class-oembed.php and includes/media.php and includes/post-template.php, and I believe the answers are within those files, I simply don't know how to implement the code and alter it to only include the content I want to display.

    Please note, I already have a file called content-video.php in my theme, which is used to display content in the "video" format (on index listings only, not single post display). So code could be customized for only that file, instead of functions.php, if that works better or easier.

    I would be open to doing this in reverse and using the_content but somehow stripping out all other text and shortcodes, if that is possible.

  2. helgatheviking
    Member
    Posted 1 year ago #

    Hi, you marked this resolved.... would you mind posting what you did to resolve it? I too am looking to have the video format automatically use oembed to display a video. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic