Theme files are included by functions so you also need to declare global $cpts
where you assign it. It won’t be global automatically.
Theme files are included by functions so you also need to declare global $cpts
where you assign it. It won’t be global automatically.