Title: Add code and scripts between parts
Last modified: August 28, 2021

---

# Add code and scripts between parts

 *  Resolved [roxer82](https://wordpress.org/support/users/roxer82/)
 * (@roxer82)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-and-scripts-between-parts/)
 * Hello.
    Is there any way to add code or scripts between parts without editing
   single.php? e.g.: I want to add this code above featured image to show the share
   buttons: `<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT();}?
   >`
 * Then, I want to add an ads script below the featured image:
 *     ```
       <amp-ad width="100vw" height="320"
            type="adsense"
            data-ad-client="ca-pub-1111111111111111"
            data-ad-slot="1111111111"
            data-auto-format="rspv"
            data-full-width="">
         <div overflow=""></div>
       </amp-ad>
       ```
   
 * And then this script below content:
 *     ```
       <amp-ad width="100vw" height="320"
            type="adsense"
            data-ad-client="ca-pub-1111111111111111"
            data-ad-slot="2222222222"
            data-auto-format="mcrspv"
            data-full-width="">
         <div overflow=""></div>
       </amp-ad>
       ```
   
 * Thanks
    -  This topic was modified 4 years, 9 months ago by [roxer82](https://wordpress.org/support/users/roxer82/).

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

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-and-scripts-between-parts/#post-14818607)
 * Hello [@roxer82](https://wordpress.org/support/users/roxer82/)
 * Thank you for the support topic, I am assuming you are using the Rader Mode Legacy
   theme?
 * I will recommend checking the [amp_post_template_data](https://amp-wp.org/reference/hook/amp_post_template_data/)
   filter with which you can modify template parts of the Legacy theme.
 * Additionally please check [our guide](https://amp-wp.org/documentation/playbooks/classic-templates/)
   about customizing the Legacy theme.
 * Hope this helps!
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-and-scripts-between-parts/#post-14843221)
 * [@roxer82](https://wordpress.org/support/users/roxer82/)
 * As we didn’t receive a response I’ll mark this as resolved. Feel free to open
   a [new support topic](https://wordpress.org/support/plugin/amp/#new-post) if 
   you require any further assistance.

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

The topic ‘Add code and scripts between parts’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/add-code-and-scripts-between-parts/#post-14843221)
 * Status: resolved