WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Vimeo embed customization (3 posts)

  1. Manuel Schmalstieg
    Member
    Posted 3 years ago #

    I'm posting here a little trick I came up with, since I wanted to customize the look of the embedded vimeo player.

    As somebody asked for 1 year ago, i wanted to remove the title, author, etc. This is possible when copying the full embed code from vimeo, but not when simply posting the url into the wordpress edit box.

    After some tinkering, a simple line of jQuery does the trick:

    jQuery('#MyContainerID iframe').attr('src', function() {
    	  return this.src + '?title=0&byline=0&portrait=0&color=ffffff'
    	});

    What does it do? Assuming that you don't use iframes for anything else, this code will look for all iframes inside the container element you specify (#MyContainerID), will take the source attribute, and will append a string of variables that hide the unwanted items.

    This javascript can be placed at the bottom of the page.

  2. eniris
    Member
    Posted 2 years ago #

    Great ! exactly what I'm looking for ! thank you

  3. Manuel Schmalstieg
    Member
    Posted 2 years ago #

    Glad to know that this brilliant solution was useful for someone :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags