• Hello,

    I want to add Video JS to mij wordpress site. But i can’t get it to work with fallback to flowplayer.
    There are some plugin’s that will do the trick, but then i have to use a shortcode in my text.

    Is there a solution where i can put the shortcode in a custom field and put this in a <div> in my template file?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter fvo

    (@fvo)

    Found the solution i think..

    <?php echo apply_filters(‘the_content’, get_post_meta($post->ID, ‘your_custom_field_here’, true)); ?>

    This snippet will enable you to add shortcode to a wordpress custom field. Normally wordpress does not run shortcodes that you put into a custom field. Just put this code into whatever page you are displaying the results of the shortcode, and change the ‘your_custom_field_here’ to the name of your custom field.

    very helpful. thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add shortcode to page template file’ is closed to new replies.