Stream Video Player does not work with do_shortcode()?

It’s not really a shortcode, its a content filter but you can try calling the plugins function directly: if (function_exists(‘StreamVideo_Parse_content’)){ echo StreamVideo_Parse_content(“[stream flv=xxx.es/wp-content/uploads/2011/04/VIDEO-UE.mp4 mp4=xxx.es/wp-content/uploads/2011/04/VIDEO-UE.mp4 provider=video img=xxx.es/wp-content/uploads/2011/04/previo-video.jpg embed=false share=false width=500 height=333 dock=true controlbar=over bandwidth=high autostart=false opfix=true /]”); }

How to show scaled featured image in template?

You can create custom size image with add_image_size() in the functions.php function add_custom_size_images() { // Add image size width 300 with unlimited height. add_image_size( ‘featured-image-300’, 300 ); } add_action( ‘after_setup_theme’, ‘add_custom_size_images’ ); And in the template to get the size that you created with the_post_thumbnail() the_post_thumbnail( ‘featured-image-300’ ); Notice: If you want it to work … Read more

Proper Javascript Implementation

If I interpret the question correctly you: Don’t have any .js javascript files Output any javascript you have from an .php file (presumably code) Include this javascript on the bottom of the page by including the .php file. So you are actually doing: Correct Combining all the javascript in one file Having the javascript in … Read more

Using Includes in Templates in Document Head

Including PHP files inside actions isn’t recommended, and is considered highly unusual. If what you were trying to do worked, it would be fragile, and heavily dependent on ordering. The reason your code didn’t work: add_action(‘wp_head’, ‘fst_include’,20); Is because actions are added with a priority of 10 by default, yet your include is on priority … Read more

New Template — copy existing template and change code? [duplicate]

For custom templates, I tend to use the default page.php, make any changes to the HTML (if need be), and enqueue an overriding stylesheet before get_header(): /** * Template Name: My Page Template */ wp_enqueue_style( ‘my-page-template’, get_template_directory_uri() . ‘/css/page-template.css’ ); get_header(); Everything’ll function like a normal page, except now you have a stylesheet for declaring … Read more

Sharing templates with the JSON API?

You can use wp_localize_script();: // Example: wp_register_script( ‘your-template-script’, $path, $dependencies, $version, true ); wp_enqueue_script( ‘your-template-script’ ); wp_localize_script( ‘your-template-script’ ,’your_template_object’ ,array( ‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ) ,’template_nonce’ => wp_create_nonce( self :: $search_nonce_val ) ,’action’ => ‘build_template’ ,’title’ => get_the_title() ,’content’ => get_the_content() ,’title_format’ => ‘h1’ ) ); Then you can use it in your template.js file … Read more

Post formats template

Post formats are used to customize posts according to their “meta” content, but they are always posts and as posts they will be listed on archive and category pages. What is parent template file that is used when there is no specified template file and what is specified template file that covers all post formats … Read more