0
votes

I'm trying to find a solution to embed a page within a page template. I found this code on the Internet. Obviously, this only adds the content of a page, not the whole page (including header/footer etc.)

<?php
    $id = $redux_demo['special-errorpage'];
    $p = get_page($id);
    echo apply_filters('the_content', $p->post_content);
?>

Anyone an idea how to tweak the code to make it do what I want it to do?

As always, many thanks in advance.

1
you need to use IFRAME tag for it. - Jenis Patel
Can you give me an example? I do know the iframe tag but what I would like to know is the right code inside the iframe. - kiarashi
you can do it some thing like this : <iframe width="420" height="315" src="your_page_url" frameborder="0" allowfullscreen></iframe> - Jenis Patel
I don't think that's exactly what I'm looking for. What I'm trying is to not only echo the_content but more like get_template from a static page. - kiarashi

1 Answers

0
votes

for import a page inside a page, i would use IFRAME html tag,

it could be dirty if you don't take care of what kind of page you happend to your current page.

i let you the mdn doc on this iframe!

https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe