Title: Filter code not work for my wp theme
Last modified: February 1, 2019

---

# Filter code not work for my wp theme

 *  Resolved [oblanda004](https://wordpress.org/support/users/oblanda004/)
 * (@oblanda004)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/filter-code-not-work-for-my-wp-theme/)
 * Hi. I have question. I use customizr theme [https://wordpress.org/themes/customizr/](https://wordpress.org/themes/customizr/)
   
   and when I add code in function.php it does not filter category and home page.
   I use code from plugin page [https://wordpress.org/plugins/schema-for-article/](https://wordpress.org/plugins/schema-for-article/)
 * I just copy and paste it at end of funcion.php code. Am I doing something wrong
   or for my theme need to add somewhere else this code. Can you please look at
   
   [https://github.com/presscustomizr/customizr](https://github.com/presscustomizr/customizr)
   do I need somewhere else to add this code becouse it seems that have separated
   folders for assets, core, inc.. I just guessing
 * When I check my homepage and category page in [https://search.google.com/structured-data/testing-tool](https://search.google.com/structured-data/testing-tool)
   I see that for my homepage i got article schema and description and title from
   last published article. The same thing is for categories too. My site is giftlightbulbs
   com

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

 *  Plugin Author [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/filter-code-not-work-for-my-wp-theme/#post-11181289)
 * Hi [@oblanda004](https://wordpress.org/support/users/oblanda004/)
 * Sorry for the delay in my response. Can you tell me what exactly do you want 
   to do?
 * Do you want the plugin does not print schema for your home and category pages?
   Is that so?
 * Kindly clarify so i can help you in it.
 * Regards,
    Sami
 *  Thread Starter [oblanda004](https://wordpress.org/support/users/oblanda004/)
 * (@oblanda004)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-code-not-work-for-my-wp-theme/#post-11243361)
 * Do you want the plugin does not print schema for your home and category pages?
   Is that so?
 * Yes
 *  Plugin Author [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-code-not-work-for-my-wp-theme/#post-11256255)
 * Hi [@oblanda004](https://wordpress.org/support/users/oblanda004/)
 * There is a filter which may help you.
 *     ```
       function yasglobal_exclude_post_types( $post_type ) {
         if ( ( is_front_page() && ! is_home() ) || is_archive() ) {
           return '__false';
         }
         return '__true';
       }
       add_filter( 'schema_for_article_exclude_post_type', 'yasglobal_exclude_post_types');
       ```
   
 * Add this filter in your `functions.php` file and check the pages.
 * Let me know your feedback.
 * Thanks,
    Sami
 *  Thread Starter [oblanda004](https://wordpress.org/support/users/oblanda004/)
 * (@oblanda004)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-code-not-work-for-my-wp-theme/#post-11270235)
 * This is not helpful at all, you just copy that code that i try to use and that
   not work for me. You can read I guess what I wrote in first comment. If you not
   want to help that’s OK but not make reply just to make reply that is not helpful
   it is BS. I already tell you that code not work for me and ask you few questions.
   Thank you for free plugin but this answer shame

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

The topic ‘Filter code not work for my wp theme’ is closed to new replies.

 * ![](https://ps.w.org/schema-for-article/assets/icon.svg?rev=1785918)
 * [SCHEMA for Article](https://wordpress.org/plugins/schema-for-article/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/schema-for-article/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/schema-for-article/)
 * [Active Topics](https://wordpress.org/support/plugin/schema-for-article/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/schema-for-article/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/schema-for-article/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [oblanda004](https://wordpress.org/support/users/oblanda004/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/filter-code-not-work-for-my-wp-theme/#post-11270235)
 * Status: resolved