Grow your CSS skills. Land your dream job.

iframe loading SAME post as parent

  • # December 8, 2012 at 10:46 am

    **What I’m trying to do:**

    ‘responsive’ self-hosted video (i.e. sized according to window width etc) in wordpress

    It seems an iframe is essential for this to work. The theme I am using already resizes anything that is in a div class=”video”. But without the iframe, the video window resizes, but alas, the content does not.

    **How I’m trying to do it:**

    When the user creates a ‘VideoPortfolio’ page they put in the mp4’s URL into a custom field
    The VideoPortfolio page will not load that video itself, but use an iframe loading a blank page using a custom template. Called ‘VideoHost’

    The VideoHost page will load the same post as the VideoPortfolio page has done. But it will make use of the Custom Field with mp4 URL

    **My question**

    Is this the best way to do it?

    If it is… How do I do it?

    Right now I have no idea how the php would look

    How would the page loaded in the iframe know to load the same post as the iframe parent?

    How would the php on the parent page load the same post (using different info/meta data and page template)?

    Thanks for any advice

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".