I would like to load a WordPress post into an
iframe when a link on a WordPress page is clicked. This is the link I currently have.
<a href="' . get_post_permalink($sight->ID) . '" target="map-loader">Read the report</a>
Then I want the content of that post (no header or footer etc) to load into an iframe when the link is clicked. This is the iframe that is on the page.
<iframe name="map-loader" src="map-iframe.php"></iframe>
I am half way there. When the link is clicked, the iframe loads a full wordpress page with the header and footer etc. what I want is the actual post content to be loaded into the iframe, no header or footer.
I have tried this in map-iframe.php but no success. Still loads the whole wordpress template.
<?php the_content('Read the rest of this entry »'); ?>
I'm thinking that my link needs something that specifies that I only want to load the post content.
Or would it be better to load with ajax?