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

Create single.php for specific category by category id

You can use this function to add category specific single template pages on your website. This goes in functions.php You can define as many single templates as you want. function wpse_category_single_template( $single_template ) { global $post; $all_cats = get_the_category(); if ( $all_cats[0]->cat_ID == ‘1’ ) { if ( file_exists(get_template_directory() . “/single-cat1.php”) ) return get_template_directory() . … 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

How do I add a text input field for customers to leave a note on a single WooCommerce product page?

The best way to extend WordPress and WooCommerce is by using hooks. To add custom option field on products area, you can use the following hooks: woocommerce_product_options_advanced: used to add a custom field into the Advanced Tab woocommerce_process_product_meta: used to save/update field data in the database On your functions.php, you can add the following code: … Read more

Use touch_time() on front-end form via plugin

You might try to include the the template.php file: <?php if( ! function_exists( ‘touch_time’ ) ) { require_once( ABSPATH . ‘/wp-admin/includes/template.php’ ); touch_time( 0, 0, 5 ); } ?> but I think it might be better to just copy the code from the touch_time() function into your own function and modify accordingly. Friday part of … Read more

custom post type archive template per custom taxonomy term

I solved it. SOLUTION: <?php if ( has_term( ‘downloads’, ‘listen’, $post->ID ) ) { get_template_part( ‘templates/content-downloads-vergriffener-baende’ ); } elseif ( has_term( ‘untersuchungen’, ‘listen’, $post->ID ) ) { get_template_part( ‘templates/content-untersuchungen’ ); } elseif ( has_term( ‘studien-materialien’, ‘listen’, $post->ID ) ) { get_template_part( ‘templates/content-studien-materialien’ ); } elseif ( has_term( ‘sonderbaende-kataloge’, ‘listen’, $post->ID ) ) { get_template_part( ‘templates/content-sonderbaende-kataloge’ … Read more