Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Remove sidebar on posts in a category?

Discussion in 'Misc WordPress Requests' started by Michael, Nov 16, 2017.

  1. Michael

    Guest

    Reply To: Remove sidebar on posts in a category?, by Michael

    generally, start by creating a child theme.

    then, you could edit single.php in the child theme, and wrap the sidebar call into a conditional statement based on is_single() && in_category( 'newsletter' )…

    or, you could add a filter to ‘body_class’ to add a new CSS class, for example .no-sidebar, also based on a conditional statement with is_single() && in_category( 'newsletter' )… and then use this CSS class in your styles to hide the sidebar and stretch the content…

    details depend – https://make.wordpress.org/support/handbook/forum-welcome/#include-as-much-information-as-possible

    Reply To: Remove sidebar on posts in a category?
     
    #1

Share This Page

Web Hosting