Code Snippet where to add?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12506
    user1337
    Participant

      Hello, I want to diasble the images and found via the search function the code snippet

      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]);
      return $args;
      }

      But where I must add this? In my theme functions.php I try it out but it do not work. Thanks for the help!

      #12513
      Olly
      Admin & Mod

        it works just fine as is.

        i suspect however you want to not show images in the frontend, in which case
        a) don’t upload any
        and
        b) disable wppizza->layout :Display placeholder image when no image associated with meal item:

        #12517
        user1337
        Participant

          Thank you Sir!

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘Code Snippet where to add?’ is closed to new replies.