Support » Fixing WordPress » use one template to call different iframe and page codes

  • astephens

    (@astephens)


    WP versions 3.7.5 and working on a blank template

    I have created a media player template that i would like to use for 3 different pages – each page to call a different iframe video and page code to bring in a unique player and video type. Each player will have a different playlist along with it.

    I would like each page to have this format but with different players:
    http://www.gracechurchhouston.com/grace
    However i had to insert the code from the page itself directly into the template for it to show up like that.

    The current page (shown in above link) has this code on the Page Text tab:

    <center>
    <h1>Sunday Morning Message</h1>
    <div>
    <iframe style="width: 908px; height: 400px;" src="http://gracecenterhouston.com/widget/player/6685" height="240" width="320" frameborder="0" align="middle"></iframe>
    </div>
    </center>

    and the Media Player Template currently looks like this:

    <?php
    /*
    Template Name: Media Players
    */
    ?>
    <?php get_header(); ?>
    <center>
    <h1>Sunday Morning Message</h1>
    <div align="center">
    <iframe style="width: 908px; height: 400px;" src="http://gracecenterhouston.com/widget/player/6685" height="240" width="320" frameborder="0" align="middle"></iframe>
    </div>
    </center>
    <?php get_footer(); ?>

    I know i need to remove the page code and specific iframe from the template and instead insert what is needed to call the page code/iframes i will be using for each of the 3 different pages. Or do i need to create a different type of template?
    Not sure if I am being clear but would appreciate any help.
    Thanks for your help…

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘use one template to call different iframe and page codes’ is closed to new replies.