Title: Message error  with code to make Archived posts appear
Last modified: August 30, 2016

---

# Message error with code to make Archived posts appear

 *  Resolved [katiska](https://wordpress.org/support/users/katiska/)
 * (@katiska)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/)
 * Hello,
 * Sorry for my english because I’m french and i’m not a professionnal with code
   🙁
 * I tried to insert the code in functions.php but i’d got a message error : Warning:
   cannot modify header information – headers already sent…
 * Can you tell me where exactly i have to insert this code in the file ?
 * Thanks by advance.
 * Katiska
 * [https://wordpress.org/plugins/archived-post-status/](https://wordpress.org/plugins/archived-post-status/)

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

 *  Plugin Author [Frankie Jarrett](https://wordpress.org/support/users/fjarrett/)
 * (@fjarrett)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6270904)
 * Hi Katiska,
 * Please paste here the exact code you put in your `functions.php` file.
 *  Thread Starter [katiska](https://wordpress.org/support/users/katiska/)
 * (@katiska)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6270912)
 * Hi Frankie,
 * Here is the code that i’ve put in functions.php file : <pre lang=”php”>
    add_filter(‘
   aps_status_arg_public’, ‘__return_true’ ); add_filter( ‘aps_status_arg_private’,‘
   __return_false’ ); add_filter( ‘aps_status_arg_exclude_from_search’, ‘__return_false’);
 * I’ve pasted this code at the end of the code in functions.php. Further to the
   error message i guessed that it wasn’t the right place …
 *  Plugin Author [Frankie Jarrett](https://wordpress.org/support/users/fjarrett/)
 * (@fjarrett)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6270918)
 * OK thanks. I will try this out myself sometime this weekend and see if I can 
   reproduce the same problem.
 *  Thread Starter [katiska](https://wordpress.org/support/users/katiska/)
 * (@katiska)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6270936)
 * Ok thanks, maybe can you tell me where i have to put the code on functions.php
   files ?
 * I think i don’t find the right place for it.
 *  Thread Starter [katiska](https://wordpress.org/support/users/katiska/)
 * (@katiska)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6271025)
 * Hello,
 * Can you tell me where I’ve to insert the code in the file functions.php ??
 * Thanks by advance.
 *  Plugin Author [Frankie Jarrett](https://wordpress.org/support/users/fjarrett/)
 * (@fjarrett)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6271110)
 * I’m probably not the best person to answer this as `functions.php` files vary
   from theme to theme. There is a lot of information on the web about this. Here
   are some links I found for you:
 * [https://www.ostraining.com/blog/wordpress/functions-php/](https://www.ostraining.com/blog/wordpress/functions-php/)
   
   [https://wordpress.org/support/topic/how-to-add-codes-in-functionphp?replies=6](https://wordpress.org/support/topic/how-to-add-codes-in-functionphp?replies=6)

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

The topic ‘Message error with code to make Archived posts appear’ is closed to new
replies.

 * ![](https://ps.w.org/archived-post-status/assets/icon-256x256.png?rev=3103140)
 * [Archive Content with Archived Post Status](https://wordpress.org/plugins/archived-post-status/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/archived-post-status/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/archived-post-status/)
 * [Active Topics](https://wordpress.org/support/plugin/archived-post-status/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/archived-post-status/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/archived-post-status/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Frankie Jarrett](https://wordpress.org/support/users/fjarrett/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/message-error-with-code-to-make-archived-posts-appear/#post-6271110)
 * Status: resolved