Welcome, please login or register

OnePress Theme

Fully widgetized theme for your website administration pleasure.

Help Menu

Install

Installing OnePress is as easy as installing any other WordPress theme. Simply copy the onepress folder from the downloaded .zip file to your wp-content/themes directory. Upon copying, goto your WordPress admin and navigate to Design » Themes and activate OnePress.

Upon activating OnePress there are a couple of behind the scenes things that will occur. No fear, we’re just making life easier for you.

When activating the theme, we will take the liberty and setting you up with some widgets in the default layout so your site will resemble functionality similar to that of installing WordPress for the first time.

Also, OnePress using a static file for its settings, located at /wp-content/themes/onepress/settings.inc.php. It is important to the functionality the theme that you have this file writable on your server. To do so, follow WordPress’ instructions on changing file permissions.

Customize OnePress

Create a Child Theme

The easiest way to build off and customize the OnePress theme is to create your own child theme that inherits all the same functionality provided by OnePress. Doing so is quick and easy and mean as little as a CSS file in which you can define your own colors.

To get started, create a new directory in your wp-content/themes to hold your child theme. It is recommended that you name it in a manner specific to the site design you are working on, i.e. myblog. Inside the newly create directory, create a file names style.css. Open the file in your text editor.

All style.css files in WordPress themes are to follow a specific format at their head. The head of these files is to contain a comment block in which important meta data should be stored.

/*
THEME NAME: myblog
THEME URI: http://www.myblog.dev
DESCRIPTION: A child theme for OnePress
VERSION: 1.0
AUTHOR: yournamehere
AUTHOR URI: http://www.yoururlhere.dev
Tags: onepress

TEMPLATE: onepress
*/

The purpose of the newly created style.css file, as it stands, is to tell WordPress that the new theme is to use onepress as its parent. (Meta data provided is used when displaying the theme as an option in the administration menu.) From here on out, you can add any CSS classes you wish to the new style.css and those definitions will replace any defined CSS in OnePress.

Also, OnePress provides CSS files that serve as the foundation for your child theme. These stylesheets contain formatting definitions for layout, navigation, and widgets. To easily include these files into your child theme, add the following lines to your style.css

/*
 * Import default OnePress Markup
 */
@import url('../onepress/op-layout.css');
@import url('../onepress/navigation.css');
@import url('../onepress/widgets.css');

To activate the new theme, log into your admin center, navigate to Design » Themes then choose your theme.

Remember, even though you are now using a child theme of OnePress for your site’s theme, it is important to stay on top of new updates to the OnePress theme. Since your theme is self-contained, you can easily update the OnePress theme by copying and replacing the files in the onepress directory when a new version is released.

Adding Content to the Header

For adding content to the header of your child theme, we have added a hook, op_header. By tying into this hook, you can add content to the header div of your site’s layout by defining a PHP function as a callback and within that function, echoing what content you wish to display. Once added, the content will be available for easily visual manipulation with CSS.

For example, say I wish to add a link to my RSS feed at the top of my header file. Using the op_header hook this is extremely easy.

In my functions.php, I register my callback function:

add_action('op_header','my_header');

This code will call my_header() at the correct point. Here’s what my callback function looks like:

function my_header(){
	echo '<div class="rss">RSS Feed</div>';
}

That’s all there is to it. Now I can open up my style.css (in my child theme of course) and edit the way this displays. The style “position:absolute” is extremely powerful here.

div#header .rss{
	position: absolute;
	right: 20px;
	top: 40px;
}

Hooks

OnePress provides a number of hooks available to the user for maximum customizability and power through PHP code. Registering a hook callback is easy, as it is accomplished in the same vein as the rest of WordPress hooks. To register your callback, simply place the following line in your theme’s functions.php file:

add_action('op_hook_name','your_callback_function');

From there, it’s as easy as defining your function and implementing and functionality you desire

op_header

Output content or execute code in the header of your the site’s layout. All desired output should be echo’ed within the callback function.

op_content_hook

When setting up a content body widget, this hook can be used to output extra content or execute code. As a parameter, your callback function will receive a string value representing the last component that was rendered inside the loop, i.e. title. The best way to use this hook is to set up a switch statement within your callback function and define cases based on the previous occurring component.

Admin

Using Tags

In the context of OnePress, tags are useful for much more than just adding taxonomy to posts.

Special Tags

The OnePress framework uses tags in a variety of different ways, acting as filters for adding posts to specific widgets and more. There are a couple of tags that will prove to be especially useful to the user.

  • feature — Posts with the tag “feature,” are automatically added to the pool of posts available for the Featured Posts Carousel widget.
  • featurette — Use this tag to make a post available for the Featurette Tabs widget. When used with other tags, you can easily choose which content you want to show in each tab of the widget.

Featured Post Progression

There is internal logic, in OnePress, that exists to prevent the appearance of a post more than once on the same page, in multiple feature-related widgets. For instance, if you tag a post with both “feature” and “featurette,” common sense would lead you to believe that the widget is eligible to show up in both a Featured Posts Carousel and Featurette Tabs widget on the same page. Because of the featured post progression logic in OnePress, widgets grab from the featured posts pool on a first come, first serve basis. In other words, if the Featured Posts Carousel is ordered prior to the Featurette Tabs widget, the carousel will receive the most recent posts, and the tabs widget will then get its content from the remaining posts. Widgets in the main column receive preferential treatment, sequentially speaking.

Note: If there are no featured posts available for a feature widget to display, then that widget will not be rendered.

Widgets

Archives Index

This widget serves to display an index of your site’s post’s archives.

Adding Content

To add content to this widget, simply click “Add a Tab” and choose the manner in which you would like the archives sorted. Multiple tabs can be added and ordered as desired.

Content Body

The content body widget is the manner in which WordPress widgetizes “the loop.” Use this widget in any place you would like for your blog posts or page content to be displayed.

Customizing Your Content Body

There are a number of components that can be added to the content body widget to make up the structure for your site’s content. To add a component, just select “Add a Component” from within the widget’s options and choose from the drop down menu to select the type of component you wish to add. The names of each of these components are fairly self explanatory. Here’s a quick run down of what’s available.

  • Title
  • Author
  • Time
  • Date
  • Post Body — the complete post
  • Post Excerpt — the excerpt from the post
  • Thumbnail — thumbnail associated with this post, as defined by OnePress image management
  • Div — an opening div tag when your content body is rendered
  • Div Close — a closing div tag to be associated with a previous defined opening div tag
  • Comments — show the posts’s comments
  • Comment Form
  • Tags
  • Categories
  • Edit Link
  • OP Content Hook

Once components in the widget are defined, their positions can be redefined by dragging and dropping them in the widget’s options. This will dictate the order in which they will be rendered on your site.

Featured Posts Carousel

This widget displays a carousel of posts displaying your latest featured posts’ titles, images, and excerpts. The widget animates between features by scrolling to the next in a continuous manner. User’s can also jump to different features by selecting the corresponding numbers which will be displayed in the top right of the widget.

Adding Content

To add a post to the feature carousel, simply tag the post “feature.” You are able to add this tag from the screen where you edit or compose your post.

Extra Options

All posts tagged “feature” will be eligible to display in the carousel widget. However, only the four most recent posts with this tag will appear. In the options of the widget exists a field in which you can select an extra tag that will be used in filtering posts to be displayed. A different extra tag can be used for each widget. This is to provide extra control over the widget for the user.

Featurette Tabs

The featurette tabs widget is a very flexible widget that displays multiple posts among different tabs. The widget automatically switches between tags enabling the user to, without interaction, view a large amount of the sites content.

Adding Content

Adding posts to the featurette tabs widget is quite easy. Tag the post “featurette” and its other tags will become available within the options for the featurette tabs widget. In the widget options, click “Add a Tab” and you can then select the tag for which you would like articles to appear in this widget. The tag that you choose will become the name of that tab and the widget will dynamically pull the newest articles for the corresponding tag. Featurette posts’ titles, images, and excerpts will be displayed in this widget.

Further Customization

There is further customizability availble within the options for this widget. You can choose the number of columns you would like to exist within a tab. This will affect the number of posts that show. Obviously it makes more sense to have more columns in a wider sidebar (such as the main area) than in a narrow sidebar.

You can also adjust the order in which the tabs display within your widget by dragging and dropping them when editing the widget.

Pagination

Easily add pagination to your site with this widget. When added to a sidebar, this widget will automatically detect the number of posts and pages and provide links to navigate through those pages.

Tabbed Content

The tabbed content widget exists to help you display a wide range of information from your site. Using a similar structure to the featurette tabs widget, this widget will present selected portion of your site’s content inside of its tabs.

Adding Content

To add content to this widget, simply edit the widgets options and choose “Add a Tab”. Once you add a tab you can select the type of tab you wish to present and the method by which you would like its content sorted.

Expandability

This widget incoprorates OnePress modules, providing expandability based on those that you choose to have active. For example, if you activate the phpBB module, the tabbed content widget has the ability to display content from your site’s forums. As more modules become available to OnePress, capabilities for this widget will also become available.

Tagged Posts

Display a list of posts of which all have a common tag.

Adding Content

Upon editing the widget, enter the tag(s) of the posts you would like to have displayed. If you enter multiple tags, separate them with a comma.

Multi Widgets

The limitation of the standard WordPress widgets is the fact that they can only be added once to one sidebar. Within the confines of OnePress, which has multiple sidebars, this limitation would prove quite constraining. Therefore, we have taking the liberty of recreating the functionality from each of the default WordPress widgets and rolling them into multi-widgets that can be used across multiple sidebars.

Customizing Your Site’s Layout

Rather than using templates, OnePress theme uses a heavily widgetized sidebar system to setup your site’s layout. Each layout consists of the main sidebar and zero, one, or two sidebars. The OnePress Layout interface is the manner in which you can choose how many sidebars exist in each layout and the order in which those sidebars are arranged.

Using the Layout Interface

Layout Default

The layout interface is incredibly powerful, providing you with a way to define a custom layout for most any page on your blog. It all begins with the default layout. By choosing what your default layout will be, you define the template from which all customized layouts will be created.

Editing Layout Sidebars

You can add or remove sidebars by checking or unchecking the corresponding checkbox within that layout. The sidebars that exist within the layout can be easily rearranged by dragging and dropping the representative box into the position you wish for it to appear. You can also remove a sidebar by clicking on its corresponding ‘x’ in the top right of that sidebar’s box.

Note, the changes you make here will not be effective until you “Save Changes”

Adding Customized Layouts

To choose a new layout to customize, select from the menu “Choose Layout to Customize.” The drop down menu presents all possible layout types that can be customized. If you choose “Category Name” or “Tag Name,” a second menu will appear that will allow you to select the specific category or tag that you will customize. To define a customized layout for all tags or categories, simply select “Tag” or “Category” from the menu.

Reverting to Default Layout

If you wish to revert a customized layout back to the default layout, simple select “Remove Customization” from that layout. After confirming that you do indeed want to remove customization, the selected layout will then reflect the current state of the default layout.

The Footer Layout

In OnePress, the footer is widgetized as well. Using the layout selector interface, you can select how many columns you would like to be included in the footer. These columns are also able to be reorganized using drag and drop functionality.

Writing/Editing Posts » Image Management

Image Management Interface

Your posts in WordPress may have images associated with them. When uploading an image, that image becomes associated with the post you are currently writing or editing. With OnePress, there are a number of place in which these images are used.

Image Display

Images appear in a number of widgets that you may use in your OnePress layout. By using the image management, you have control over which images are used and in which contexts.

There are three places in which these images are used to represent the post– thumbnails, features, or featurettes. Each of these image types has a default image if you do not select one.

Assigning Images

To assign images to a particular display type, simply choose that type from the drop down menu and click the image you would like to use. Upon choosing to “save” or “publish” the post, your settings for the post’s images will be updated and changes will be reflected in all widgets.

If no images show up in this interface, select “Add Media” » “Add an Image” from the post editor to upload images to this post.

Using Custom Fields

Image Management Custom Fields

You also have the ability to manually edit the values for these images in the custom fields section of the post editing screen. The keys– “op_img_feature”, “op_img_featurette”, and “op_img_thumbnail”– each represent their respective image. If these fields are not present to edit, you must manually add a field and enter in the key and value for that image you are wishing to edit, i.e. “op_img_feature.” The integers that are presented are those values used by WordPress internally when you upload an image. Do not attempt to edit these values unless you are familiar with the image post ids.

In editing the custom fields, you can enter a url value of an image location. If you do so, the image located at that url will be displayed for the post when that image type is used.

Default Images

The widgets, Featured Post Content and Featurette Tabs, both use default widgets in the case that a post is tagged “feature” or “featurette” and does not have an image defined for the respective size. The Featured Post Content widget only uses the “feature” size and the Featurette Tabs widget uses both “featurette” and “thumbnail” sizes depending on how many columns are selected for the tab.

These default images can be customized on a per basis for each child theme. To do so, simply add default_feature.png, default_featurette.png, and default_thumbnail.png to a folder called images in your wp-content/themes/child_theme_name/ directory, i.e. wp-content/themes/child_theme_name/images/default_feature.png.

Modules

Modules exist to make OnePress as a theme, extensible to the site administrator. By adding and activating modules, your site’s functionality expands beyond the confines of the WordPress platform.

Notice: We highly recommend that you use the same admin name and password when installing packages auxillary to WordPress. This will help keep your admin login to be unified and help avoid having to login as a different user to administrate different modules.

phpBB3

The phpBB module serves as a method by which WordPress becomes integrated with the popular forum system. To use this module, there must exist an installation of phpBB on your server. Upon, activing the module, there are a few steps that need to be taken for the integration to be functional.

Compatible with phpBB3.

What does activating this module do? This module consists of a OnePress default style and authentication library. When activating the module, the OnePress systems adds the necessary files to your phpBB installation for integration to occur.

Post-activation, do the following:
Choose “Op” as your authentication method

Do this by logging into the phpBB administration panel. Navigate to: Client Communication » Authentication. Change the Select an authentication method option to “Op” and save changes.

phpBB Activate

Attention: Installing WordPress in phpBB in separate directories

Since phpBB and WordPress are separate packages, you may choose to install each in its own directory. If this is the case, a little extra configuration will be required in order for your integration to properly function.

Note, the most common installation path for phpBB is in a folder under the root path for WordPress. This would look like:

/site/wordpress/
/site/wordpress/phpbb/

If this is your path setup, then your installation won’t require any extra path configuration. If it is not your setup, then you will need to adjust path settings in both WordPress and phpBB.

In WordPress, navigate to the OnePress settings in the admin panel and find the text box labelled “Choose path for phpBB.” In this field, you will need to enter the path of phpBB relative to WordPress. For instance, if you have your site setup like:

/site/wordpress/
/site/phpbb/

You will need to enter “../forum/” for this field and save changes.

There is also an option located in the phpBB administration center under Client Communication -> Authentication called “WordPress Path” that will need to be adjusted if WordPress is anywhere but the site’s root directory. For instance, if you install your WordPress package under /site/blog/ then you will need to enter “blog/” for this option’s value.

Tips for a Seamless Integration

Allow Anyone to Register

In WordPress, navigate to General Settings inside your admin center and click the checkbox for “Anyone can register.” This will allow users to register through your WordPress site as well as phpBB.
Setting Membership

Turn on PHP in phpBB Style Templates

OnePress compatible phpBB styles, such as Greytouch, require that PHP is enabled in templates. This allows your site to dynamically display the site’s title, navigation and more. To turn on this option, in phpBB, log into the Administration Control Panel. After doing so, navigate to “Server Configuration” -> “Security Settings.” Find the option “Allow php in templates” and choose “yes.” Then submit the form to save changes. Note, you may need to clear the phpBB cache after adjusting this setting to have the changes reflected when viewing your forums.

Use phpBB Related Widgets

As of this version of OnePress, there are two widgets that will pull in data from your phpBB install for display inside of WordPress. To help your integration feel complete, use these widgets where appropriate. They are the “Tabbed Content” and “phpBB Content” widgets.

Change your WordPress Secret Phrases

There is a known issue with logging in from phpBB where the cookies are not being properly set in WordPress. To avoid this issue, please make sure your secret phrase in your WordPress wp-config.php file does not contain any spaces.

Recommended Plugins

IE6 Support

If you really need to support IE6 but don’t want to feel the pain, learn all the hacks and clutter up your CSS and markup you might consider the IE7/8 Javascript project by Dean Edwards. It “upgrades” older versions of IE to behave more closely to the current releases. Yes it is not perfect, yes there are drawbacks, but do you really think it is worth your time to support an old browser that should be dead?