Title: WordPress loop within an iframe fails
Last modified: August 19, 2016

---

# WordPress loop within an iframe fails

 *  [snowboy76](https://wordpress.org/support/users/snowboy76/)
 * (@snowboy76)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-loop-within-an-iframe-fails/)
 * Searched on this topic and found some that was more of a “can you” versus my 
   issue, which is a “why isn’t this working” issue.
 * First, I know the downsides of an iframe. But I have a full page jQuery horizontal
   accordion (that I did not write, I can’t program, period, I just cut/paste code
   I find) and I can’t figure out how to get wordpress loop to move to previous 
   posts without reloading the accordion, which would default to its open panel (
   which may not be the one you are on).
 * So, I set the link of the iframe to loop.php. Fail. Get this:
 * Notice: Undefined variable: wp_query in C:\wamp\www\wp-cuyuna\wp-content\themes\
   onlygoodaccordian\loop.php on line 4
 * Notice: Trying to get property of non-object in C:\wamp\www\wp-cuyuna\wp-content\
   themes\onlygoodaccordian\loop.php on line 4
 * Fatal error: Call to undefined function have_posts() in C:\wamp\www\wp-cuyuna\
   wp-content\themes\onlygoodaccordian\loop.php on line 12
 * So I take the index.php from the twentyten theme, remove the calls for the header
   and footer and save it as news.php. Fail. Get this:
 * Fatal error: Call to undefined function get_template_part() in C:\wamp\www\wp-
   cuyuna\wp-content\themes\onlygoodaccordian\news.php on line 11
 * I would appreciate any and all help.

Viewing 1 replies (of 1 total)

 *  Thread Starter [snowboy76](https://wordpress.org/support/users/snowboy76/)
 * (@snowboy76)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-loop-within-an-iframe-fails/#post-1599358)
 * ^^^ Bump
 * Really? No ideas, thoughts, or help?

Viewing 1 replies (of 1 total)

The topic ‘WordPress loop within an iframe fails’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [snowboy76](https://wordpress.org/support/users/snowboy76/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-loop-within-an-iframe-fails/#post-1599358)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
