• Resolved Obje

    (@harrow)


    Hi,

    In order to keep my theme folder as clean as possible does anyone knows if it’s possible to move CPT files (single-CPT.php, archives-CPT, …) into a dedicated folder (‘CPT’ in this case), just it is for the templates page, instead of letting them into the root folder of my theme.

    Thank you by advance for your input ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s possible because template locations can be filtered, but I’d advise against it just for organizational purposes. This applies only to primary templates like single-*.php, etc. Template parts can and should reside in theme sub-folders.

    Thread Starter Obje

    (@harrow)

    Hi bcworkz,
    Thank you for your reply

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move Custom Post Type files into dedicated folder’ is closed to new replies.