Title: Manually adding to template
Last modified: August 31, 2016

---

# Manually adding to template

 *  [Fobstar](https://wordpress.org/support/users/fobstar/)
 * (@fobstar)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/manually-adding-to-template/)
 * This is a great looking plugin but we want to control where the files are being
   added in our post layout by manually inserting the php code into the single post
   template. How do we stop the attachments from automatically being added to every
   post and manually add to the post template instead?
 * [https://wordpress.org/plugins/wp-attachments/](https://wordpress.org/plugins/wp-attachments/)

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

 *  Thread Starter [Fobstar](https://wordpress.org/support/users/fobstar/)
 * (@fobstar)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-7188858)
 * We would like to exclude video files from appearing in the attachment list as
   well. Cheers 🙂
 *  Thread Starter [Fobstar](https://wordpress.org/support/users/fobstar/)
 * (@fobstar)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-7188859)
 *  Plugin Author [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * (@milmor)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-7189174)
 * You can exclude the entire metabox, but at the moment the only way to exclude
   files is to unattach them to the content (not really suggested).
 * Thank you for the feedback
 *  [gtuxyco](https://wordpress.org/support/users/gtuxyco/)
 * (@gtuxyco)
 * [10 years ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-7189215)
 * Ok just edit this lines in wp-better-attachments.php and you can call from the
   template using:
 *     ```
       wpatt_content_filter();
       ```
   
 * Edit
    Line 73
 *     ```
       add_filter('the_content', 'wpatt_content_filter');
   
       function wpatt_content_filter($content)
       ```
   
 * change for
 *     ```
       //add_filter('the_content', 'wpatt_content_filter');
   
       $content=get_the_content();
       function wpatt_content_filter()
       ```
   
 * Line 195:
 *     ```
       $content .= apply_filters( 'wpatt_list_html', $content_l );
       ```
   
 * change for
 *     ```
       $content =apply_filters( 'wpatt_list_html', $content_l );
       echo $content;
       ```
   
 *  [kevin91](https://wordpress.org/support/users/kevin91/)
 * (@kevin91)
 * [10 years ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-7189216)
 * Just created an account to say thank you for this.
 * Solved a major issue for me 🙂
 * This should totally be an added feature to the plugin to extend functionality.
 *  [wellbeingtips](https://wordpress.org/support/users/wellbeingtips/)
 * (@wellbeingtips)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-7189224)
 * Shuld I use this if i want to add download in my sidebar widget?
 * Can you please explain how to use wpatt_content_filter(); after i will do the
   changes to the plugin?
 * Thanks!
 *  [BartTheMan](https://wordpress.org/support/users/barttheman/)
 * (@barttheman)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-8185168)
 * If we change the plugin, what happens when you update it ?

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

The topic ‘Manually adding to template’ is closed to new replies.

 * ![](https://ps.w.org/wp-attachments/assets/icon-256x256.png?rev=2617427)
 * [WP Attachments](https://wordpress.org/plugins/wp-attachments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-attachments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-attachments/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-attachments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-attachments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-attachments/reviews/)

 * 7 replies
 * 6 participants
 * Last reply from: [BartTheMan](https://wordpress.org/support/users/barttheman/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/manually-adding-to-template/#post-8185168)
 * Status: not a support question