Welcome, please login or register

Workflow Tips: Building a New Site with OnePress

Workflow Tips: Building a New Site with OnePress

Because OnePress is such a powerful framework for building sites, it’s not hard to get overwhelmed by all of the customizations one will want to do. To provide some insight, I have decided to share with you how I start out building new site in which I’m working with OnePress.

First things first, I need to get OnePress installed and activated as my WordPress theme. Doing this is fairly simple as I just need to unzip and upload the theme to my server and browse to my administration panel to activate the theme.

Because OnePress is really a WordPress “Theme Framework,” I am going to focus most of my energy into creating a child theme, which references OnePress for all of its content management features. If you’ve never created a child theme in WordPress before, don’t worry, it’s really straight forward. In my /wp-content/themes/ directory, I am going to make a new directory called “seanasullivan.” This is where all of the files for my child theme will live.

The true magic of this theme takes place in the creation of a style.css file. At the top of the newly created filed, I enter the following:

/*
THEME NAME: Sean A Sullivan
THEME URI: http://www.seanasullivan.com/theme
DESCRIPTION: Use for Sean A Sullivan's site.
VERSION: 1.0.0
AUTHOR: Sean A Sullivan
AUTHOR URI: http://www.seanasullivan.com
Tags: onepress, sean sullivan, sas
TEMPLATE: onepress
*/

Notice the second to last line of the commented code: “TEMPLATE: onepress” This is telling WordPress that it is a child theme and it will derive its functionality from “onepress.”

There exists some base CSS functionality in OnePress that your child theme can easily inherit. This CSS handles the layout, widgets, and navigation CSS. Now, these are default styles to get you off the ground and running. If you wish to customize the look of, for example the widgets, we recommend that you copy and paste the appropriate CSS file into your child theme’s directory for complete control.

To use the default CSS, simple add these lines to the style.css file:

@import url('../onepress/op-layout.css');
@import url('../onepress/widgets.css');
@import url('../onepress/navigation.css');

Now that “Sean A Sullivan” is a valid theme (as far as WordPress is concerned) I am going to go activate it. With this theme active, WordPress will now become my blank slate on which I can setup and style as I see fit.

Activating a new theme

Activating a new theme

After taking care of my initial layout setup, it’s time to make this all look as desired. Read my next post in this series to learn how I attack a mock up for implementation in OnePress.

Leave a Reply

You must be logged in to post a comment.