WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Viper's Video Quicktags] Video in excerpt (4 posts)

  1. Drew Baker
    Member
    Posted 4 years ago #

    Hey Viper,
    Is it possible to have your videos come up in a custom excerpt? I tried adding this line to my function.php file but it just makes the embed code a link.

    add_filter( 'the_excerpt', 'do_shortcode');

    If so, then I could have different sized video previews on the mainpage using the_excerpt, then the full size one on the single page the_content.

    Thanks,
    Drew

  2. joey santiago
    Member
    Posted 4 years ago #

    hello,

    i have the same problem... when the excerpt is needed, i just see a blank space with firefox and a preview image in explorer7.

    adding add_filter( 'the_excerpt', 'do_shortcode'); does not help... and i don't know what else i could try! :(

    please, help! :)

    thanks a lot,

    joey

  3. joey santiago
    Member
    Posted 4 years ago #

    i found quite a fun way to make it work.
    the problem looks like being the fact that the javascript code needed to display the video (getting the code that creates the "white space" i saw on firefox) is added at the end of the post code. changing the code of function SWFObjectCalls in order to add the javascript BEFORE the post text makes it working! :)

  4. The only problem with that is it won't work for the last post (as the JS for each post is displayed at the beginning of the next post).

    Try this:

    remove_action( 'the_content', array(&$VipersVideoQuicktags, 'SWFObjectCalls'), 50 );
    add_action( 'wp_footer', array(&$VipersVideoQuicktags, 'SWFObjectCalls'), 50 );

Topic Closed

This topic has been closed to new replies.

About this Topic