Support » Theme: OceanWP » How to completely remove sidebar through editing child themes?

  • Resolved cryptotera789

    (@cryptotera789)


    Hi,

    I would like to completely remove the sidebar. I heard that I would need to edit theme files by using child theme. Can you please navigate me in doing this?

Viewing 4 replies - 16 through 19 (of 19 total)
  • Theme Author oceanwp

    (@oceanwp)

    You’re welcome 🙂

    adrianvnunez

    (@adrianvnunez)

    Hey there,

    I’m having the same issue. I tried following all those steps above but cannot seem to get rid of the sidebar. I have the oceanwp theme and I installed a plug-in that creates posts for me (custom post type) and it displays the sidebar. I did everything I could and chose full width for both the general page layout and also for the blog section but it didn’t change anything at all.

    I also tried to place the code:

    /**
    * Alter your post layouts
    *
    * Replace is_singular( ‘post’ ) by the function where you want to alter the layout
    * @return full-width, full-screen, left-sidebar or right-sidebar
    *
    */
    function my_post_layout_class( $class ) {

    // Alter your layout
    if ( is_singular( ‘post’ ) ) {
    $class = ‘full-width’;
    }

    // Return correct class
    return $class;

    }
    add_filter( ‘ocean_post_layout_class’, ‘my_post_layout_class’, 20 );

    in the functions.php file and that didn’t do anything also!

    Any thoughts? Thanks.

    @oceanwp

    Confirmation: editing functions.php was the only working way to get rid of annoying sidebars.

    Please read this as a feature request for a future update for OceanWP; an ‘on/off’ toggle switch switch at Customize > Blog > Single Post would do it perfectly 🙂

    BTW, thank you for your incredible job! OceanWP fits perfectly in my every day business and at the moment I don’t ever see any reason to switch to another theme!

    Keep on groovin’!

    Arthur

    @arthurkoncar yes, for now, there is the only way to remove the sidebar for custom post type is adding the code using the child theme. We will consider it as a feature request. Thank you very much!

Viewing 4 replies - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.