BuilderChild-Covell
(Added "How to push single post thumbnail to its own line when the width is small") |
(Added "How to add categories and tags support to Projects") |
||
| Line 80: | Line 80: | ||
</pre> | </pre> | ||
| − | = | + | = How to add categories and tags support to Projects = |
| + | |||
| + | <gallery widths=200px caption="Before and After"> | ||
| + | File:Covell-categories-tags-before.png | ||
| + | File:Covell-categories-tags-after.png | ||
| + | </gallery> | ||
| + | |||
| + | '''1.''' Edit single-builder_projects.php | ||
| + | |||
| + | Add the following below <code>'supports' => array( 'title', 'editor', 'thumbnail', 'author'),</code> | ||
| + | |||
| + | <pre class="brush:php;"> | ||
| + | 'taxonomies' => array('category', 'post_tag'), // To add Categories and Post Tags boxes for this custom post type | ||
| + | </pre> | ||
| + | |||
| + | '''2.''' Now Project Add/Edit screen will have Categories and Post Tags boxes. | ||
| + | |||
| + | [[Image:Covell-categories-tags-boxes.png]] | ||
| + | |||
| + | '''3.''' Download [http://i.min.us/id3Niq.gif this] image, rename it as tag-bg.gif and upload it to your theme's images directory. | ||
| + | |||
| + | '''4.''' Add the following at the end of child theme's style.css: | ||
| + | |||
| + | <pre class="brush:css;"> | ||
| + | .meta-bottom .tags { | ||
| + | display: block; | ||
| + | background: url("images/tag-bg.gif") no-repeat left center; | ||
| + | font-size: 0.8em; | ||
| + | padding-left: 25px; | ||
| + | } | ||
| + | </pre> | ||
Revision as of 01:07, May 12, 2011
Contents |
How to set up Covell like the demo site
Note: These instructions are incomplete.
1. Activate Covell child theme
2. Go to Pages -> Add New. Create Pages that should be present in your site.
[Optional] If you would like to import the data in demo site
3. Go to Appearance -> Menus and create a new menu titled Demoñu (copy the menu title text from this page and paste it). Populate this menu with items that should appear at the top navigation.
4. Take a backup of your existing layouts, views and Settings as a safety measure. Go to My Theme -> Settings. Click "Import / Export" tab. Create an export containing existing data (Layouts and Views, Settings).
5. Download builder-export-layouts-and-views.zip. Go to My Theme -> Settings. Click "Import / Export" tab. Click Import Data link. Browse to where builder-export-layouts-and-views.zip has been saved and click Import. Select Replace (Note: If you have set up a lot of layouts already, you should Add Layouts instead of Replace) and go to next step.
Click Run Import.
6.
How to make use of the Projects feature
Covell's unique feature is the Projects custom post type.
When Covell is activated, Projects section appears in the dashboard below Posts.
To create a new Project entry, click on Add New.
Enter a title, project description, click on "Set featured image" link and select one, optionally a layout that this project page (single view) should use and hit Publish.
Repeat this for as many projects as you want.
To visit the page that lists all projects, go to www.yoursite.com/projects. Note: Do not create a Page titled "Projects".
Note that projects page has been designed to only show featured images and not content of the projects. Each featured image will link to its project page (single view).
How to display Projects instead of posts on Posts page
Before:
After:
Edit theme's index.php.
Add the following above <?php if ( have_posts() ) : ?>
<?php if(is_home()) { query_posts(array('post_type'=>'builder_projects', 'paged' => get_query_var( 'paged' ) ) ); } ?>
How to push single post thumbnail to its own line when the width is small
- Before and After
Add the following at the end of child theme's style.css:
.single-post-thumbnail {
clear: both;
}
How to add categories and tags support to Projects
- Before and After
1. Edit single-builder_projects.php
Add the following below 'supports' => array( 'title', 'editor', 'thumbnail', 'author'),
'taxonomies' => array('category', 'post_tag'), // To add Categories and Post Tags boxes for this custom post type
2. Now Project Add/Edit screen will have Categories and Post Tags boxes.
3. Download this image, rename it as tag-bg.gif and upload it to your theme's images directory.
4. Add the following at the end of child theme's style.css:
.meta-bottom .tags {
display: block;
background: url("images/tag-bg.gif") no-repeat left center;
font-size: 0.8em;
padding-left: 25px;
}

