Title: php code to show in theme files
Last modified: August 21, 2016

---

# php code to show in theme files

 *  Resolved [Ashish Verma](https://wordpress.org/support/users/ashish-verma/)
 * (@ashish-verma)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/php-code-to-show-in-theme-files/)
 * Is there any way to show iFrame within theme files, not through shortcode? If
   yes, can you please provide php code to display iFrame in single.php file? Thanks.
 * [https://wordpress.org/plugins/scrapeazon/](https://wordpress.org/plugins/scrapeazon/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [jhanbackjr](https://wordpress.org/support/users/jhanbackjr/)
 * (@jhanbackjr)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/php-code-to-show-in-theme-files/#post-5057294)
 * Hello, ashish-verma.
 * I’m not sure if this is what you’re asking for, but you could make use of the
   WordPress `do_shortcode` function inside a theme file to obtain the iframe.
 * For example, if you wanted to display the iframe that contains reviews for Stephen
   King’s 11/22/63, you could include the following PHP code at an appropriate place
   in single.php:
 * `<?php echo do_shortcode('[scrapeazon asin="1451627297"]'); ?>`
 * Let me know if that’s not what you were looking for.
 * Thanks for using ScrapeAZon.
 * James
 *  Thread Starter [Ashish Verma](https://wordpress.org/support/users/ashish-verma/)
 * (@ashish-verma)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/php-code-to-show-in-theme-files/#post-5057312)
 * Thanks, it’s working as desired. One more thing, how I can add more iframe parameters
   like scroll off, height / width, etc?
 *  Plugin Author [jhanbackjr](https://wordpress.org/support/users/jhanbackjr/)
 * (@jhanbackjr)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/php-code-to-show-in-theme-files/#post-5057328)
 * Hello, ashish-verma.
 * You can control the width and height of the iframe by issuing the width and height
   parameters in the shortcode. For example:
 * `<?php echo do_shortcode('[scrapeazon asin="1451627297" width="500" height="500"]');?
   >`
 * You can disable the iframe border by using the `border="false"` shortcode parameter.
 * However, if you prefer not to add the shortcode parameters, you can also style
   the iframe by using CSS. The iframe element’s ID is `scrapeazon-iframe`. Therefore,
   you could add the following CSS to your theme/child theme to style the iframe:
 *     ```
       #scrapeazon-iframe {
          height: 500px;
          width: 500px;
          border: none;
       }
       ```
   
 * Currently, ScrapeAZon does not support including the full range of iframe options
   in the tag itself by way of the shortcode. (For example, you can’t set `scrollbars
   ="no"` in the iframe tag by way of the shortcode yet). However, support for parameters
   other than height, width, and border might be added in a future version.
 * Thanks for using ScrapeAZon. Since you have the shortcode working in PHP, I’m
   marking this topic as resolved. Let me know if I can be of further assistance.
 * James

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php code to show in theme files’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/scrapeazon_6694ff.svg)
 * [ScrapeAZon](https://wordpress.org/plugins/scrapeazon/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/scrapeazon/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/scrapeazon/)
 * [Active Topics](https://wordpress.org/support/plugin/scrapeazon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scrapeazon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scrapeazon/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [jhanbackjr](https://wordpress.org/support/users/jhanbackjr/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/php-code-to-show-in-theme-files/#post-5057328)
 * Status: resolved