CSS for CPT template files to display page full width

  • Author
  • #144296

    Original poster

    I am using multiple custom post types on my site, many of which have their own templates to define layout e.g. https://hellocommunity.net/mentorm-participant/mmparticipant1/ . I would like some of these templates to display the page full width without the right menu. I have tried putting the following code in the CSS of the template with no effect.
    body.single-post .row .fourcol { display:none; }
    body.single-post .row .eightcol { width:auto; }

    I am assuming that single-post is referring to the template for the standard theme single.php template which therefore does not apply to my template which is called “Template for MentorM Participants”. Can you suggest any CSS that could be applied to templates for CPT templates to make them full width?

    The blog I need help with is: (visible only to logged in users)


    Theme Author

    Hi there – thanks for the message.

    I think the best thing to do might be to use the widget visibility settings to hide the sidebars. The content should then stretch to full width automatically when the widgets are hidden. This will also mean there’s not widgets on the page that have been hidden (which is better for seo and site speed).

    There’s info on using the widget visibility settings here: https://dailypost.wordpress.com/2013/05/28/widget-visibility/

    By the way; since your site has a Business plan, you’re entitled to live-chat and email support from wordpress.com staff, accessible here:

    I’m always happy to answer your theme related questions in this forum, but those other support avenues may be faster, and you’ll always get a wordpress.com staff reply.

The topic ‘CSS for CPT template files to display page full width’ is closed to new replies.