changing wppizza custom post type arguments

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4026
    Olly
    Admin & Mod

      in case you want to change some of the wppizza custom post type arguments (for example, turning off comments which are by default enabled and/or adding tags which are by default disabled) try something like the following.

      
      add_filter('wppizza_cpt_args','my_wppizza_cpt_arguments');
      function my_wppizza_cpt_arguments($args){
      /**disable comments**/
      $supp=array_flip($args['supports']);
      $cid=$supp['comments'];
      unset($args['supports'][$cid]);
      /**disable featured images**/
      $supp=array_flip($args['supports']);
      $cid=$supp['thumbnail'];
      unset($args['supports'][$cid]);
      /**enable tags**/
      $args['taxonomies']=array('post_tag');
      return $args;
      }
      
    Viewing 1 post (of 1 total)
    • The topic ‘changing wppizza custom post type arguments’ is closed to new replies.