I am using underscore to develop a wordpress theme.
I have a custom post type name project
, thus I have, for instance, this url: http://a.site.local/projects/a-beauty/
.
I have in my template-parts/
directory the file content-projects
.
$ cat template-parts/content-projects.php
<h1>Project</h1>
When I browse http://a.site.local/projects/a-beauty/
, I have my title but also the sidebar and the footer (even if they do not appear in my content-project.php
nor in index.php
).
Where are those widgets coming from / loaded ?
2
Answers
Please share some more code from your project so we can easy to understand the real problem.
Add conditions to the header, footer and sidebar.
For whole custom post archive:
For custom post only:
If you want to put the code you WANT to show, remove the ‘!’ before condition.
P.S.
You can put the whole content in a condition, but keep the
otherwise the page will break 🙂