• Hello, WordPress experts! I need your help to makes my particular post to be appeared as full width. I tried to search in internet but I found nothing says about full-width for posts, they just teach to implement full-width for WordPress pages. While my theme has built-in full-width pages attribute already, but the one is not for the posts.

    So, perhaps, is there any way to add “full-width” attribute in the post’s feature? In case not, how to remove the sidebar and extend my particular post for 100% width?

    Thanks in advance for your assistance! I’ve been looking this solution in such a loooonnggg time…

    • This topic was modified 6 years, 8 months ago by ihsansfd.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi ihsansfd – you may be able to “hide” the sidebar by using a CSS class of display: none; for that area. The only other way that I know of would be to address your post stylesheet for the body size. Again both of these solutions would be in your main CSS file. The faster fix may be to hide the sidebar – to see if the content would then extend to full width. You can reach out to your theme author directly on this too. They may have a simple fix.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    For one specific post or for all posts?

    If you do this inside of your CSS file – it would effect all posts. If you do this inside of your PHP file and do it based on a post ID it could be applied to each post one by one.

    This may be something available though by default in your theme. You may want to connect with the theme authors directly on it. Might be a lot more simple than we’re making it.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    @webtegrity: not necessarily. Each page has a page-id body class, so you can target CSS to specific pages/posts.

    Thread Starter ihsansfd

    (@ihsansfd)

    @sterndata For one post. Yes I can use post-id class, but I just don’t know how to work with it. Hope your assistance.

    Thread Starter ihsansfd

    (@ihsansfd)

    @webtegrity it didn’t work. I’ve tried and it just made my post left blank space at the right side (the sidebar). So there is still one complication which is to remove the blank space area and eventually extend the post as well.

    Thread Starter ihsansfd

    (@ihsansfd)

    If I can create a “full-width” post’s attribute as well as the page’s it would be really helplful…

    Yes – then, again, this would be something very specific to your theme’s structure / code. You’ll want to ask your theme author directly on their support forum or email.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Look at the <body> tag for a particular post. This applies to https://bahasteknologi.com/cara-menghilangkan-konten-dewasa-di-instagram/

    .postid-4173 .mh-sidebar {
       display:none;
    }
    .postid-4173 .mh-content {
       width: 100%;
    }

    To add CSS: use the “Additional CSS” option in the customizer. https://codex.www.ads-software.com/CSS#Custom_CSS_in_WordPress

    Learn to use the Chrome Developer Tools to help you see and test changes to your CSS.

    Thread Starter ihsansfd

    (@ihsansfd)

    @sterndata it works well. Thanks a million, you save my live!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to add “full-width” functionality to the posts (not pages)’ is closed to new replies.