WordPress.org

Ready to get started?Download WordPress

Forums

WP YouTube Player
How to specify width, height for a single instance (10 posts)

  1. mprewitt3abn
    Member
    Posted 10 months ago #

    I can see how to set the global default settings for this plugin. But how do you configure the settings (width, height, fullscreen, etc.) for a particular page or post, if you want different options than the default?

    http://wordpress.org/extend/plugins/wp-youtube-player/

  2. W.P. Ginfo
    Member
    Posted 10 months ago #

    1. Install 'SuperSlider-Perpost-Code'-plugin.
      This plugin will allow you to add custom css or javascript to each post and page individually.
    2. Open the post / page in question in the editor.
    3. Simply add the CSS you want for that particular post / page, and you're done.
  3. mprewitt3abn
    Member
    Posted 10 months ago #

    In my experience, video player plugins usually specify parameters in the HTML, which would override or conflict with CSS. Have you actually tried that solution with this plugin to get a custom-sized video player? If so, which CSS class/id did you modify?

  4. W.P. Ginfo
    Member
    Posted 10 months ago #

    Alternatively you coud use something like:
    <iframe width="640" height="360" src="http://www.youtube.com/embed/HIf0JW7JhcE?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>

  5. mprewitt3abn
    Member
    Posted 10 months ago #

    I'm still hoping for an answer to my original question that doesn't involve other plugins or circumventing this plugin altogether.

  6. W.P. Ginfo
    Member
    Posted 10 months ago #

    Most plug-ins like this will have a global effect.
    Hence the workaround for individual posts and pages.

    Yet another alternative would be to create a template [NOT a theme] that meets your requirements, and apply that template to the page / post in question. You could for instance incorporate instyle settings for the style and size of page / video display optios etc. you wish.

    http://codex.wordpress.org/Page_Templates
    http://codex.wordpress.org/Category:Templates
    http://codex.wordpress.org/Templates
    http://codex.wordpress.org/Template_Tags

  7. mprewitt3abn
    Member
    Posted 10 months ago #

    Most other plugins similar to this one have overrides for videos through settings in the video URL link or video shortcode. I was hoping this one did too, or that it could be added to a future version.

    I doubt any CSS/template-based solution will work. The video player options are usually controlled by HTML parameters.

  8. W.P. Ginfo
    Member
    Posted 10 months ago #

    I recreated your situation.
    All described solutions worked.
    Have a better alternative? Be my guest, and share it here.
    We're here to learn.

  9. mprewitt3abn
    Member
    Posted 10 months ago #

    Please post a link so I can see what you did.

  10. W.P. Ginfo
    Member
    Posted 10 months ago #

    1. Open a new page or post
    2. !!IMPORTANT!! use the text-tab [right to of edit-window]
    3. paste code
      <iframe width="640" height="360" src="http://www.youtube.com/embed/HIf0JW7JhcE?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>
    4. check result
    5. open same post / page
    6. edit width and height
    7. check result

Reply

You must log in to post.

About this Plugin

About this Topic

Tags