• I have a client that wants to change the layout of their main blog page and the categories pages.
    They want to see the new layouts before they go live, so how could I create a second template for these?
    This is a live site and there’s no dev site right now.
    Is it possible to do without a dev site? Maybe in a subfolder?

    • This topic was modified 4 years, 10 months ago by Jan Dembowski.
Viewing 4 replies - 1 through 4 (of 4 total)
  • If it is coded as a theme option, you would go into Customizer, set the option for the new layout, and save as a Draft. In the little panel that slides out when you save as draft, there is a link you can copy. Send this link to the client and they will see the site as it shows in the Customizer preview.
    Once you are ready, you can then Publish the changes in the Customizer, so it will be on the live site instead of just a draft.

    Thread Starter mcheeks

    (@mcheeks)

    Unfortunately it’s not a theme option. I need to actually change the template files. So I was trying to figure out a way to have a demo blog page that doesn’t change the live blog page.
    I might be able to do it with a custom page template, but I’m not sure if that’s the best way.

    You said blog and category pages, so that is not a candidate for page templates. You could code the change into the theme’s existing templates by adding a theme option.

    By the way, you can test on a category by making a template file specific to that category, by naming it with the category slug or ID. See the Template Hierarchy.

    You can also export data from the live site, and use a sandbox to test with. https://wpsandbox.net/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Second layout for Blog and Categories’ is closed to new replies.