Ten Good Reasons to use WordPress Child Themes and Template Parts

We are really getting into the WordPress 3 child themes and template parts, they can cut down the workflow and time to market for theme developers, learning to use WordPress child themes and template parts can give you the edge and make you more competitive.

If you are just starting out or been working with WordPress for years and not looked at WordPress child themes and template parts, here our our views on why you should take the time to look at how they can be used.  

Continue reading

Child Theme Plugin

It is no secret that I was disappointed with the latest offering from Artisteer, it is still a great product for community groups and webmasters, but for me as a developer the use of the ini file which is causing problems with YouTube, adSense etc:, and the structure of the new themes being not easy to enhance, lots of the addition features many of us were building in are now no longer viable, this has made me step back from a product that has not been tested enough before release.

Having now spent a lot of time with the Twenty Ten theme and a text editor, using new functions like template parts and producing the tutorials, I was thinking of a way forward where we would not have to edit the generated templates.

A select options or plug and play solution is really needed, I thought I could produce an application but this then leaves out the Mac users, so I think the most practical way forward is a WordPress plugin.

Continue reading

Content Page

When we planned the theme in the earlier tutorial our home page was designed to have a sidebar on each side, we also had four content widgets, we are going to create this as a template page that can be applied to any blog page, with both the left and the right sidebars and four content areas.

In this tutorial we will be identifying the structure and the styles we need to change for our content page layout, we will work with two sidebars and the four content areas.

We will create one template pages that can be applied from the admin area, we will use five of the  template parts we created, this will be another good example on the use of template parts.

Continue reading

Three Columns

When we planned the theme in the earlier tutorial our home page was designed to have a sidebar on each side, we are going to add and create another layout, not as just the home page but as a template page that can be applied to any blog page, with both the left and the right sidebars.

In this tutorial we will be identifying the structure and the styles we need to change for our three column layout, we will work with four sidebars both the wide and narrow sidebars.

We will create two template pages that can be applied from the admin area with different sidebar widths, we will use the template parts we created earlier to add our sidebars, this will be a good example on the use of template parts.

Continue reading

Right Sidebars

If we are following the tutorials then we would have a new set of widgetized areas, in this section we will be working with the right sidebars, we created two right sidebars and will create two template parts and two template pages, we will also need to adjust the inline styles to accommodate the right sidebars.

In this tutorial we will be identifying the structure and the styles we need to change for our right sidebars, we will work with both the default sidebar and second right sidebar.

We will create template pages that can be applied from the admin area with different sidebar combinations, we will also create template parts that will add our new sidebars, this will reuse the new element we created to hold the two sidebars for the two right sidebars page.

Continue reading

Left Sidebars

If we are following the tutorials then we would have a new set of widgetized areas, in this section we will be working with the left sidebars, we created two left sidebars and will create three template parts and three template pages, we will also need to adjust the stylesheet blocks to accommodate the left sidebars.

In this tutorial we will be looking at the themes page layout with FireBug, identifying the structure and the styles we need to change for our left sidebars.

We will create template pages that can be applied from the admin area with different sidebar combinations, we will also create template parts that will add our new sidebars, this will mean creating a new element to hold the two sidebars for the two left sidebars page.

Continue reading

Widgetized Areas

Now we have a clear picture of the layouts for the template pages we want for our theme we have to create the content areas, we were thinking of leaving the names of the Twenty Ten sidebars and just tagging our new areas on the end.

On reflection we will disable the Twenty Ten widgetized areas and add our own, this will make the management of the widgetized areas easier, and we will be able to order them in the workflow we prefer.

In this tutorial we will be removing the WordPress call in the parent theme that creates the widgetized areas, WordPress 3 introduced some new functions one of these will be used to remove the action that loads the sidebars.

We will create a new function that will create our own widgetized areas, this function will introduce us to using arrays to store variable values to be used in a For Each code loop.

Continue reading

Layout

Now we can see how easy it is to change things using a child theme we will be moving onto creating widgetized area in our theme and different layouts, we have likely looked at a number of premium themes that boast a number of widgetised areas, number of sidebars and number of layouts, we will be creating a child theme with a number of these features, but key to any project is planning.

In this tutorial we will be looking at what are widgetised areas, the planning of a website, different layouts, how we can use different templates for different pages.

We will decide on the quantity and names of new widgitized areas for our child theme, looking at the flexibility, building in redundancy and allowing for variances.

Continue reading

Post Images

Over eighteen months ago WordPress introduced built in thumbnail support, this is now a part of the Twenty Ten theme, however many themes like magazine themes and layouts may need a custom size, in this tutorial we will add support for two sizes that we are going to use to display posts with an image and the post excerpt, we will use one of these now for our archive and index page, the other later when we tackle a two column layout.

If we follow the steps in this tutorial we will be able to add two custom images sizes to a theme and retrieve the images to use in our archive and home page post list, we will be looking at the code that returns the images.

We will be editing the loop template part and be able to create a basic magazine style layout for a website using WordPress.

Continue reading