• qrkkogyh

    (@qrkkogyh)


    I think I’ve discovered a bug in the OceanWP theme on WordPress. Using the most up to date version of both, when you set your sing post block layout to full-width (pic shown), and you create a new page with the block editor and add a paragraph, then add a Preformatted block. When you preview the page the paragraph is width limited to whataver your single blog post width is (700 by default) BUT the preformatted block is 100% full width of your screen! It also happens with the table widget, and perhaps others too.

    Does anyone know why some blocks do this and some don’t, and how to fix it? I want to use the full-width layout but I want everything in the page to honour the fixed width setting.

Viewing 1 replies (of 1 total)
  • Shahin

    (@skalanter)

    Hello @qrkkogyh,

    Thank you for reaching out,

    In this case, there are two methods to resolve the 100%-full-width size of some blocks.

    Method 1: The simple way is to add a 1-column layout and then place your desired block into that column. This will add a wrapper around your desired block: https://postimg.cc/NKN7tzfY

    Method 2: Add the CSS below in Customizing > Custom CSS/JS > CSS Code:

    
    .single-post.content-max-width #content-wrap pre{
        margin: 1.5em auto;
        max-width: 700px;
    }
    

    – You can add your desired classes to the CSS above to add more blocks, but the first method will work in all situations.

    Please read this link for more information about the CSS/JS code on the customizer: https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website.

    Note: If you have any cache plugin or server cache(CDN / Browser Cache and Cookies and …), you need to clear its cache contents or disable them to see your changes.

    Please note that specific support for preformatted and table blocks has not been added yet, but it will be included in one of the next updates.

    I hope that helps.

    Please let me know if you have any questions about the above steps.

    I hope it helps.
    Best Regards

    • This reply was modified 7 months ago by Shahin.
Viewing 1 replies (of 1 total)
  • The topic ‘[Bug] OceanWP with Blog / Single Post / Full width layout width’ is closed to new replies.