• Resolved thaistiti

    (@thaistiti)


    Hello,
    i already use “HENTRY” markup for blog posts, i just need this plugin for pages.
    How can i exclude posts ? (is_single)
    Thx !

Viewing 1 replies (of 1 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @thaistiti

    Welcome to the support forum of the SCHEMA for Article Plugin and sorry for the delay in my response i was on vacations and didn’t get time to reply the queries.

    Yes, you can exclude PostTypes as shown here:

    
    function yasglobal_exclude_post_types( $post_type ) {
      if ( $post_type == 'post' ) {
        return '__false';
      }
      return '__true';
    }
    add_filter( 'schema_for_article_exclude_post_type', 'yasglobal_exclude_post_types');
    

    To know more, please visit our Github page:
    https://github.com/yasglobal/schema-for-article/#exclude-posttype-from-the-plugin

    This filter is allowing to the Plugin to be work on Posts only and exclude all other PostTypes.

    Now, you can manipulate this according to your need.

    Thanks,
    Sami

Viewing 1 replies (of 1 total)
  • The topic ‘Enable plugin only on pages, not blog posts’ is closed to new replies.