WordPress.org

Ready to get started?Download WordPress

Forums

Custom Template with iframes not working with password protect (2 posts)

  1. eruedas84
    Member
    Posted 1 year ago #

    Hi, I'm using a custom template that displays only a header image, and an iframe that pulls from a protected server. The owners of the website want the whole page password protected as well, but when I create a new page that uses the custom template and set it to password protect, the page will request a password, but still display the content. I've worked out that I need to add something to the template to get the password protect field to show up, just not what. I'm using Blank Slate as the theme, and haven't edited any of the other templates. Here's what my template looks like:

    <html>
    <head>
    <title>Iframe 1 Page</title>
    </head>
    <body>
    <?php
    /*
    Template Name: Iframe 1
    */
    ?>
    <?php get_header(); ?>
    <article id="content">
    <?php the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="entry-content">
    <?php the_content(); ?>
    <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'blankslate' ) . '&after=</div>') ?>
    <div id="markerpage">
    <div id="contentframe">
    <p align="center"><img src=""/>
    <iframe src=""></iframe>
    </div>
    </article>
    <?php get_footer(); ?>
    </body>
    </html>

    TIA!

  2. ahainen
    Member
    Posted 8 months ago #

    I'm having this same issue with impress.js currently. Basically I need to put an iframe hardcoded in the template and WordPress won't have any of it. All the plugins I find are to enable the shortcode, which I don't need.

Topic Closed

This topic has been closed to new replies.

About this Topic