Site logo

Archived topic

Can I exclude certain widgets from my blog?

1 reply · Started by choi on July 27, 2022

Viewing posts 1–2 of 2

Adding a table of contents widget

The latest posts will be displayed on the blog page.
Can't I exclude this part of the site?

I wish the table of contents widget was only visible in posts.

plugin: Easy Table of Contents

ps: In my opinion, this seems to be a plugin problem, but I'm asking here as well.

Hi there,

instead of using a widget, you could try adding it using a Block Element - hook:

https://docs.generatepress.com/article/block-element-hook/

You can select the before_right_sidebar or after_right_sidebar hook ( theres also hooks for the left sidebar.
Then you can use the Display Rules to only apply it to your Posts.

Alternatively you will need to ask the plugin developer or use a conditional sidebar plugin like this one:

https://en-gb.wordpress.org/plugins/custom-sidebars/

This archived topic is closed to new replies.