This topic has 2 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #138697
     Happiier
    Participant

    You have a post called “Show featured IMAGE before the content area” which works great. However I would also like featured VIDEOS to do the same.

    Can you please provide the code for this function.

     

    With Gratitude,

    Blaze

    PS – I managed to get it to work sometimes using a plugin called ‘featured video plus’… however it seemed to only work spontaneously and created other problems with post grid display.

     

    FROM ORIGINAL POST:

    add_action(‘kleo_before_main’, ‘sq7rdu_show_featured_before_content’);

    function sq7rdu_show_featured_before_content() {

    if (is_single()) {

    if (has_post_thumbnail()) {

    echo ‘<div class=”fullwidth-image-before-content”>’;

    echo the_post_thumbnail(‘full’);

    echo ‘</div>’;

    }

    }

    }

    #138900
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #139075
     Radu
    Moderator

    Hi,

    Try with this function and add video to media tab oembed

    COPY CODE
    
    add_action('kleo_before_main', 'sq7rdu_show_video_featured_before_content');
    function sq7rdu_show_video_featured_before_content()
    {
        $video_embed_url =  get_post_meta(get_the_ID(), '_kleo_embed', true  ) ;
    
        if (is_single()) {
            if ( ! empty( $video_embed_url ) ) {
                echo apply_filters('kleo_oembed_video', $video_embed_url);
                }
            }
    }
    

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?