Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw

Support for: Razor: Cutting Edge WordPress Theme

Razor

Public Group  |  active 1 year, 9 months ago ago
Viewing post 1 to 2 (2 total posts)

Change layout for custom post type archive page?

  • boucha

    said

    How would I change the layout for an archive page? Currently, it shows a sidebar and I would like it to be full width, but only in the archive-custom_post_type.php page.

  • jeffw

    said

    You’ll need to register your template for use with the Razor layout manager and then you’ll be able to set a layout for that template. There’s an example of how to do this at the foot of the Appearance > Layouts settings page. Here’a another…

    $the_template = locate_template('archive-my_custom_post_type.php');
    register_context( 'My Custom Post Type', 'my_cpt', $the_template);

    In the above example you would end up with a new context under the “Registered Template Files” heading in Appearance > Layouts labelled “My Custom Post Type”, and to the right of it will be a drop-down menu that will enable you to choose a default layout for that layout from any of the existing layouts.

Viewing post 1 to 2 (2 total posts)