Skip to:
Content
Pages
Categories
Search
Top
Bottom

Embedding in buddypress

  • Avatar of Splendorito
    Splendorito
    Participant

    @splendorito

    Hi!

    I’m very interested in embedding from Verold or Sketchfab. I see it doesn’t work. Does anybody know how this problem can be solved?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of BuddyBoss
    BuddyBoss
    Participant

    @buddyboss

    WordPress uses “oembed” for automatically converting pasted links into embeddable content. It does not support those two sites.

    You can see the full list of supported sites here:

    https://codex.wordpress.org/Embeds

    The simple answer is you will need to use their full embed code. Example:

    http://verold.com/blog/2013/1/14/tutorial-embedding-your-project-on-the-web#.UwvSRvRdUTs

    You would have to embed the full iframe code.

    Avatar of Splendorito
    Splendorito
    Participant

    @splendorito

    Hi, thank you for answering!

    Yes, i have tested those. They worked in bbpress for both Verold and Sketchfab. But buddypress seems not to like it. Any suggestions…?

    Avatar of Splendorito
    Splendorito
    Participant

    @splendorito

    Can anyone see if it is something wrong with this code or test it who has more knowledge about buddypress?.

    
    <?php
    
    wp_embed_register_handler('verold’, 'http://studio.verold.com/projects/([\w]+)/embed', 'wp_embed_handler_verold');
    
    function wp_embed_handler_verold($matches, $attr, $url, $rawattr) {
    $embed = sprintf(
    '<iframe frameborder="0" width="600" height="400"
    src="http://studio.verold.com/projects/%1$s/embed"></iframe>',
    esc_attr($matches[1]));
    
    return apply_filters('embed_verold', $embed, $matches, $attr, $url, $rawattr);
    }
    
    ?>
    
    

    Best Regards

    Avatar of BuddyBoss
    BuddyBoss
    Participant

    @buddyboss

    Not sure why that doesn’t work. You might want to download this plugin (which supposedly works with BuddyPress) and investigate their code to see how they’re doing it.

    http://wordpress.org/plugins/embedly/

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.