Hey Viper,
I want to display my videos on the front page (index.php) at 300px wide, but have them 500px when viewing a single post (single.php). Is there a way to view the same video at different sizes?
Your changelog says that version v6.1.2 added a filter that lets themes resize videos automatically. Would that do it? If so, how? I'm hoping for something similar to the_post_thumb feature.
Thanks!
Try this something like this in your theme's functions.php:
add_filter( 'vvq_shortcodeatts', 'dbaker_vvq_modifier', 10, 3 );
function dbaker_vvq_modifier( $atts, $tag, $rawatts ) {
if ( is_singular() ) {
$atts['width'] = 500;
$atts['height'] = 375;
}
return $atts;
}
That'll override the width/height in singular views (posts and pages).
Viper,
This is great! Thanks.
Is there a way to use it twice to allow more sizes? I tried just doubling it up and changing the modifier name, but it doesn't work like that I suppose.
As a side note, this would be a good note to add into the FAQ on the Plugin page.
Thanks!
Add more conditionals inside of the function.
http://codex.wordpress.org/Conditional_Tags