Header/Footer Visibility Conditions

Not sure if i am doing this right.

ive set up header and footer. ive added them to their respective fragment places, and then now trying to hide on one page -

it appears still (both header and footer same conditions).

am i understanding/doing this wrong?

Hi @Spipov,

Please ensure you do not have the header/footer added directly to the templates.

As previously mentioned, the Fragments are added by Cwicly automatically based on the visibility conditions you specify so you don’t need the fragments/template parts directly in the singular/archive templates.

Also, you may want to add a Show If > all condition first which you then override with the Do not show if condition.

Mine are in parts

and in fragments

i did try the show if >all as well, same thing.

The key aspect of my post was that they are not within the templates directly. Just checking that this is the case for you as that would cause them to appear regardless of the visibility conditions you specify.

They are in my index template. is that the reason? i dont remember putting them there in all honesty.

can i just remove them from the index.php and leave it empty?

@Spipov If you are seeing the Header in the backend of the Index Template and you want to use Fragments you would have to remove it from the Index Template. Otherwise it will repeat and you will have two instances of the header on the frontend.

Excellent, thats done it thanks @hopscotch and @StrangeTech

1 Like

New Question: i need to hide header from ACF CPT “Project Page”

That does not work. any thoughts how to target a CPT post type? (post type is Projects)

Singular will target the individual post pages, Archive will target the post archive.

It isn’t 100% clear whether you are wanting to hide the header on one or both of these, so that is something to take into consideration if you haven’t already.

Im trying to target all the posts themselves within the cpt type projects if that makes sense. Im happy for it to appear within the archive

In that case, try changing the Exclude Type to OR. Technically everything else you have done is correct.

you learn something new everyday. never in a million years would i have thought of that. thanks, its working!