Title: iframe for posts
Last modified: August 24, 2020

---

# iframe for posts

 *  [nikmanolis](https://wordpress.org/support/users/nikmanolis/)
 * (@nikmanolis)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/iframe-for-posts/)
 * Hello
 * How to implement a frame inside a page and every time to display one post using
   ajax? Obvious will be inserted only the post content.
    -  This topic was modified 5 years, 9 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/iframe-for-posts/#post-13333262)
 * You don’t need Ajax if using iframes. The iframe makes a request to the src attribute
   for it’s content. Iframes are sort of problematic because requesting a post by
   its permalink will include all the theme chrome with the content. You’d need 
   some sort of post template which only includes post content without theme chrome.
   Even then, these days iframes can run into CSP issues. As long as you control
   the source’s headers, CSP can be dealt with.
 * Alternately, use Ajax to fetch post content and insert it into a div container
   for the purpose, not an iframe. You could develop a custom Ajax handler to deliver
   post content, or use the REST API to get post data in JSON format. Your JavaScript
   would then extract the post content from all the post data, then set it as the
   div container’s inner HTML.

Viewing 1 replies (of 1 total)

The topic ‘iframe for posts’ is closed to new replies.

## Tags

 * [iframe](https://wordpress.org/support/topic-tag/iframe/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/iframe-for-posts/#post-13333262)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
