Sidebars showing in blog page but not in individual posts

Hey guys,

The sidebar is showing up in my blog page (https://omnibeats.com/type-beats/) but not showing in blog posts somehow.

I have tried many things in the widget, sidebar and customizer but none of it seems to be working.

You guys have suggestions for me?

Thank you for your time and effort!

Hi,

To add sidebar to your post, you need to select Layout with sidebar under Theme Options > Layout and Design

But if you need it to be full width but want to have sidebar to your single post. Leave it as full width then add the code below in your child theme’s functions.php

/* Enable Sidebar for Single Post */

add_filter('x_option_x_layout_content', 'override_layout_content_for_single');

function override_layout_content_for_single( $layout ) {  
    if ( is_singular('post') )  {      
       $layout = "content-sidebar";
   }
  return $layout;
}

Hope that helps

First of all, thank you for your time!
My settings in Layout and Design were already set to that (see screenshot).
However, it’s not working.

Would you have any other suggestion outside of adding the additional code?

Hi,

I checked and can see the layout has a sidebar but your sidebar is blank and has no content.

Please navigate to Appearance > Widgets and try adding test content to your sidebars. That way you will know what sidebar was assigned to your posts page.

If that doesn’t help, please provide us your wordpress admin login in Secure Note

Thanks

Wow. I figured it would just use the “main sidebar”.
I feel so stupid now.

Thank you so much!

We are delighted to assist you with this.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.