How to create custom layouts and static pages in themes for clients

How do I build goodlooking, custom pages into my themes. I’ve decided to use underscores to create custom client themes, as I need complete freedom in design, and all the tutorials I’ve found on theme development seem to just show how to build blog style websites, but I’d like to build sites with multi column layouts, icons, call-to-actions, a home slider.. basically mostly static content, but parts of the website where the client can add a gallery.. maybe a calendar, post updates, add slides to a slider ect.

Should I just throw the static html into a template file and then enqueue the css and scripts for it, and then add widgetized areas where needed? I would really appreciate anyone’s help, and maybe links to reading material / tutorials on the topic? I’ve done a lot of research, but am still pretty lost…

Solutions Collecting From Web of "How to create custom layouts and static pages in themes for clients"

Static pages: Valid?

Yes. You absolutely can add static pages that have nothing to do with a blog aside from using WordPress “routing” API out of the box and the database.

Styles, Script: How?

Simply add your custom styles and scripts to your theme. Then register and enqueue them. You can add your own Page Templates. Since WP 3.4 the actual page template files can get collected in a themes sub directory for better organization. Just add a template comment and make them available:

<?php
/** Template Name: Landing Page for Small Business */

// Optional: Use a custom header
get_header( 'customheader' );
// Rest of your static page template code

When you then add a new page, the new template will appear in your “Page Attributes” meta box and will look close to the following:

enter image description here

Author Options: How?

Pages are, like nav menu entries and other things, just a plain post (in the database) with a different post_type. That means that you can add meta boxes like you would for every other (custom) post type as well. Just add a new meta box, then save the new post meta data. You can even remove the default editor. Finally just fetch your saved post meta data in your template. You can dump all your posts custom data using get_post_custom( get_the_ID() ); in the loop in your custom page template:

<?php
/** Template Name: Landing Page for Small Business */
get_header( 'specialheader' );
// The Loop:
if ( have_posts() )
{
    while ( have_posts )
    {
        the_post();

        the_title();
        // All your post meta data:
        var_dump( get_post_custom( get_the_ID() ) );
    }
}

The rest is up to you and your imagination. Build a user interface for slider customization into your meta box, make selects, radio buttons or whatever other form elements and options you can come up with.

Why not build a blog style website first? If you’re new to WordPress, it’s better to start with something relatively easy, where there are lots of tutorials for. Practicing will give you the skills to reach for something higher, like the list of ambitions you give.

If you need all those things you say right now, you’re better of with buying a decent framework theme, that has all the elements you need. Really, it will only frustrate you if you try to build a complex theme from scratch without some easy and intermediate practice first.

If you’re already experienced with HTML & CSS, then I’d suggest starting by building pages the way you’d like them and then looking at https://codex.wordpress.org/Template_Tags to see how you can replace key sections of the pages dynamically from WordPress.