Blockquote and videowrap

This topic contains 6 replies, has 3 voices, and was last updated by  Giri 8 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #364697

    Roman
    Buyer
    Post count: 232

    Hi,

    Recently someone added a listing in my directory with lots of links in the listing description. Usually links don’t become clickable, and those links that are from youtube or vimeo are being wrapped with a php snippet in order to stay responsive.

    But in this exact case one of the links to a client’s website became “blockquote.wp-embedded-content” and wrapped as if it was a video iframe.

    Result – it looks bad and I cannot fix it with css without ruining styling of the real video embeds.

    Can you please help me fix it?
    Thank you.

    #364698

    Roman
    Buyer
    Post count: 232
    This reply has been marked as private.
    #364716

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    please provide credentials and a developer will follow up.

    Thanks

    #364727

    Roman
    Buyer
    Post count: 232
    This reply has been marked as private.
    #364826

    Giri
    Expired Member
    Post count: 3155

    Ho roman,

    I modified the filter like this in your website.

    
    
    function geodir_oembed_filter($html, $url, $attr, $post_ID) {
        if (strpos($html, 'blockquote') !== false) {
    	$return = $html;
        } else {
            $return = '<div class="geodir-post-video-wrapper">'.$html.'</div>';
        }
        
        return $return;
    }
    add_filter( 'embed_oembed_html', 'geodir_oembed_filter', 10, 4 ) ;

    Keep in mind wordpress automatically adds the oembed part for the supported sites. So the link is converted to blockquote.

    Thanks

    #365480

    Roman
    Buyer
    Post count: 232

    Thank you Giri, it works and looks great 🙂

    #365555

    Giri
    Expired Member
    Post count: 3155

    You are welcome 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount