Different size video display for category page (smaller) & detail page (larger)

The best solution here is to use the built-in filter for embed parameters: <?php function mytheme_embed_defaults( $defaults ) { return array( ‘width’ => 100, ‘height’ => 100 ); } add_filter( ’embed_defaults’, ‘mytheme_embed_defaults’ ); ?> This code can be added to your theme’s functions.php file and you can change the numbers to reflect the sizes that … Read more

VideoJS in a Widget?

To display shortcodes in widgets , use a regular text widget, and add this line to your theme’s functions.php file: // Use shortcodes in text widgets. add_filter(‘widget_text’, ‘do_shortcode’); This tells WordPress to render the shortcodes in widgets. and if you want to call your shortcode by php you can use do_shortcode() function // Use shortcode … Read more

Shortcode not displaying video as expected

Had a bit of a brain wave and thought I would capture the output and return it in the function. Turns out it fixed the problem so the final code ended up looking like this: function amazon_video($atts){ extract( shortcode_atts( array( ‘file’ => $file ), $atts ) ); $url = get_bloginfo(‘url’); $return = “<embed src=””.$url.”/jwplayer/player.swf” name=”player” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)