How do I create a full width (no sidebar) post for a custom post type?

Hello,

Once again, I'm really liking the service and I'm making use of many of the plugins!

I just figured out (using the plugin - Custom Post Templates) how to create custom post templates for regular posts, but I'd like to be able to have the same full width post template for a custom post type I created.

Do you have any suggestions as to how I can do this?

Thanks,
Michael Hayes

  • Kasia Swiderska

    Hello Michael,

    If you created the custom post template (singe-mycustompost.php) and you copied there contents of the single.php file, then you need to alter the HTML markup to fit your needs - this is: remove the sidebar and add CSS styles for this template.
    Or you can use page.php template if you have one for full width and then replace the HTML markup in custom post template with it.
    Third way is to do it with the CSS. Every post should have it's own class in body tag, for example "singe-my_custom_post_type" and with it you can hide sidebar for your custom posts:

    .singe-my_custom_post_type #sidebar {display: none;}

    Kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.