WordPress.org

Forums

Oembed with front end posting. (2 posts)

  1. enderpal444
    Member
    Posted 3 years ago #

    Im trying to implement Oembed into this front end posting plugin called "Post from site". Anyone familiar with this plugin and know how I go about adding oembed so that someone can put a link to video in the content?

  2. sareiodata
    Member
    Posted 2 years ago #

    You don't need a particular front end posting plugin to solve this issue. All you need to do is filter the_content when displaying it.

    function oembed_filter( $content) {
    global $wp_embed;
    add_filter( 'embed_oembed_discover', '__return_false', 999 );
    $comment_text = $wp_embed->autoembed( $content );
    remove_filter( 'embed_oembed_discover', '__return_false', 999 );
    return $content;
    }
    
    add_filter( 'the_content', 'oembed_filter');

    FIY, If you need a more complex plugin for front end posting try out WCK - Front End Posting. http://www.cozmoslabs.com/wordpress-creation-kit-sale-page/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.