Site logo

Archived topic

Possible to put a hook only on content only pages

5 replies · Started by Bandara on May 17, 2021

Viewing posts 1–6 of 6

Hello!

I'm trying to figure out if it is possible to place a hook only on pages that have no sidebars. Is there something obvious I'm missing?

I have a tag cloud in the sidebar and I'd like to put right above the footer on pages that have no sidebar.

Hi there,

are you selectively disabling sidebars for individual pages ?

I do. Will I just need to select them individually under Location to add the hook?

I have disabled them on archives, so that would just be one location. That's no problem.

Just was hoping there was a more automatic way to do it.

The easiest way would be to add the hook to all pages and use CSS to hide the hook from pages that have sidebars.

If you'd like to pursue this path, please link us to the site which the hook is activated.

Ahh, the reverse trick!

Yep, I was able to do it with this:


body.right-sidebar div.tag-cloud-bottom{
	display:none;
}

Thanks!

Nice! Good job :)

This archived topic is closed to new replies.