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

  • Resolved cryptotera789



    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 6 replies - 16 through 21 (of 21 total)
  • Theme Author oceanwp


    You’re welcome 🙂



    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.


    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’!


    @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!

    Hi – as i didnt use a Child theme I have to do this every time I update OceanWP theme. Is there any way i can get around having to do this after every update? thanks.




    I have somehow the same problem. Sorry to bump this post up.

    It’s on my homepage. A Whole part hase gone black. Normally there’s no sidebar there.

    [url=][img][/img][/url][url=]online photo hosting[/url]

    This is the website i have the problem with https//

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