javascript - Remove content if loaded in iframe? -
i'm working on wordpress onepager , want open wordpress posts in iframe. works fine, header , footer still appear in iframe.
in wordpress' single.php there these 2 lines:
<? get_header(); ?> <? get_footer(); ?>
if delete them, header , footer gone, great, open link directly , not in iframe looks totally naked without stylesheet, header, etc.
is possible - maybe php - remove these 2 lines if site being loaded in iframe?
the url using in iframe: i'm assuming it's single.php change single.php?iframe=yes.
or if have single.php?id=whatever
change single.php?id=whatever&iframe=yes
in single.php use
if (!isset($_get["iframe"]) get_header(); if (!isset($_get["iframe"]) get_footer();
Comments
Post a Comment