Support » Themes and Templates » Shortcode Does Not WORKING Inside theme function.php

  • Hi, I do have a problem with my template. I do have 2 websites that had same Themes/Template, and same version of wordpress which is 3.5.1 and same code that I used. Its so strange that in one of my site that script is working and in the other one is not.

    I attached the exact code that I used.

    function home_video(){
    global $post;
    $HomeVideo = get_post_meta($post->ID, 'HomeVideo', true);
    $id = getYouTubeIdFromURL($HomeVideo[0]);
    $output .= '<div style="height: 1px; padding-top: 5px;"></div>';
    $output .= '<h2 class="new-title" style="font-size: 20px;">'.$HomeVideo[1].'</h2>';
    $output .= '<center>';
    $output .= '<object width="560" height="315"><param name="movie" value="'.$id.'?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'.$id.'?version=3&hl=en_US" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>';
    $output .= '</center>';
    $output .= '<div>&nbsp;</div>';
    return $output;
    add_shortcode('homevideo', 'home_video');

    Please help me 🙁


  • The topic ‘Shortcode Does Not WORKING Inside theme function.php’ is closed to new replies.