Remove footer and header

Hi
I want to remove header and footer for some pages. But the problem is there is no code in single.html file where that views was added.
Where are they placed? And how I can remove them not globally?

This is something that depends on the theme you are using. If you look at the code of a few different themes you will notice that they can look quite different.

Post a link to the theme you are using, or even better, a link to your git repository.

If you do not have your code in a repository I warmly recommend you get a GitHub account and push your code there. Then add a link to the repo for every question you ask here.

That way the people here will much more easily be able to help you.

This is theme we use

Here’s your footer:

/home/drm/parsa-hugo-master/layouts
 ├──􀀂  _default 
 │  └──􀀀  baseof.html   {{- partial "footer.html" . -}}
 └──􀀂  partials 
    └──􀀀  footer.html   <footer class="bg-secondary">

if certain pages should not have it, either add a {{if not .Page.Params.no_footer}}…{{end}} condition in baseof.html, or add “type: no_footer” in the frontend of your files, and create a template for it like this:

WEBSITE/themes/hugo-book/layouts
 ├──􀀂  _default 
 │  ├──􀀀  baseof.html 
 └──􀀂  no_footer 
    ├──􀀂  _markup … 
    └──􀀀  baseof.html 

Same thing for your header:

/themes/parsa-hugo-master/layouts
 ├──􀀂  _default 
 │  └──􀀀  baseof.html   {{- partial "header.html" . -}}
 └──􀀂  partials 
    └──􀀀  header.html   <header class="navigation">

baseof.html

Thanks!
But now we don’t have this file (baseof), and everything work without it. Maybe you have idea for another place for header and footer? Or I need to add this file, make changes and everything will be ok?

Then which template do you use ? Where are your <html> and <body> tags ?
Could you show the arborescence of your project?

That’s our project. It wasn’t made by me, so I don’t know what it it here.

Are you loading the theme as a go module?

If you post a link to your repo we would not need all these back and forth question.

Take a copy of baseof.html in the parsa theme and place it in your sites layout folder, here: layouts/_default.

Hugo will then use the local version of baseof.html and you can edit it as needed.

As you can see, this have already been done with the list.html and single.html

Now it works, thanks!