Skip to main content
3 of 4
added 151 characters in body
bravokeyl
  • 3.4k
  • 6
  • 27
  • 33

Custom template should be archive-gallery.php instead of archive-posttype.php

It's archive-$posttype.php where $posttype is the custom post type slug.

WordPress first looks for archive-$posttype.php and if it's not available then chooses archive.php

Same for the custom taxonomies also , the flow is:

taxonomy-$taxonomy-$term.php --> taxonomy-$taxonomy.php -->  taxonomy.php --> archive.php
bravokeyl
  • 3.4k
  • 6
  • 27
  • 33