Site logo

Archived topic

Trouble with blog-post specific sidebar

3 replies · Started by catbiscuits on October 23, 2022

Viewing posts 1–4 of 4

I would like to have two widgets (Latest Posts and Archives) on either blog pages or single posts from the blog.

But there is some kind of weird interaction with—I think—GeneratePress.

On my old site, I had Widget Context Pro. That worked fine. On the new site, it's the strangest thing, it appears on some of my widgets, but not all—most especially it won't appear on Latest Posts or Archives! So I can't set those. Okay.

Given that it won't work, I tried Context-Aware Sidebars. That kind of works, but inconsistently.

Both Latest Posts and Archives appear on the blog page (the index that has all the blog posts on it).
Neither appears on individual blog posts.
If I go to the blog page for a specific month, neither appears.

I realize these are not GeneratePress modules, but the former, at least, worked for years on my site but broke when I changed the theme to GeneratePress. Any advice is welcome.

Hi Catbiscuits,

Well, if you go to Appearance > Widgets, you can add a WordPress Latest Posts Block and a Categories Block for these.

You can also add a WordPress Search Block if you prefer.

Would these work for your preference? Let us know.

I'm not sure what you mean, but then how will WP know to show those only on blog posts? What is the categories block for? Am I missing something?

OH! Maybe I didn't explicitly mention that I want the recent posts and categories **ONLY** on blog post pages, not on my front page, not anywhere else.

Oh I see. Sorry for misunderstanding.

If that's the case, the GeneratePress approach to this would be to use a Block Element - Sidebar. Reference: https://docs.generatepress.com/article/block-element-sidebar/

Through this, you can specific in the display rules, which specific pages/posts you only want the custom sidebar to appear.

You should also be able to add the same WordPress Blocks there.

This archived topic is closed to new replies.