WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Jul 19 2011

Announcing My First Two New Genesis Child Themes: MinFocus & Pinkalicious

Here are my first two developed Child Themes. While I have built many custom child themes for clients, many of them have morphed into examples that I would rather not show. Some have been from PDF (probably originally Word), AI, and PSD to WordPress Genesis Child Theme. So here are my first two Genesis Child Themes.

MinFocus

MinFocus
Click for Larger Image

MinFocus is a flexible theme that could be used for a photoblog, blog or other personal website. Besides the default Genesis templates, it offers a Portfolio template and an extremely flexible Grid Blog template.

The home page features a space for a slider which is widgetized for easy customization. Furthermore, it easily integrates with WP-Cycle becoming auto-enabled upon activation. And MinFocus contains a default image setting for posts without a thumbnail or image inserted into the post.

MinFocus Demo

Pinkalicious

Pinkalicious
Click for a Larger Image

Pinkalicious is a Genesis Child theme that can also be used for a photoblog, blog or other personal website. Besides the default Genesis templates, it too offers a Portfolio template and an extremely flexible Grid Blog template.

The home page features a slider that can be customized in the theme settings page, and contains a default image setting for posts without a thumbnail or image inserted into the post.

Pinkalicious Demo | [purchase_link id="15517" text="Purchase" style="button" color="gray"]

Please let me know if you would like to give one of these a test drive via a comment or Twitter (@wp_smith)

Written by Travis Smith · Categorized: Genesis, WordPress

Jul 16 2011

Conditionally Remove Post Info from Posts Using Custom Fields

So recently, someone asked me how to remove post info only from specific posts using custom fields. Here is what I came up with:

First, set your custom field name to whatever you'd like it to be. I used no_post_info. And then set its value. I used true, but it really can be anything (other than false or null).

Then add to your functions.php:
[php]<?php
add_filter('genesis_post_info', 'wps_post_info_filter');
function wps_post_info_filter($post_info) {
if (genesis_get_custom_field('no_post_info')) //again, no_post_info can be whatever you name your custom field
$post_info = '';
return $post_info;
}
[/php]

Written by Travis Smith · Categorized: Genesis, Tutorials

Jun 28 2011

How to Add Genesis Child Theme CSS Wraps (Structural Wraps) Easily and Quickly

So, since Genesis 1.6, and probably my favorite part of Genesis 1.6 is the theme support of genesis-structural-wraps. So now you can easily add wraps to the header, nav, subnav, inner, footer-widgets, and footer. This is something I found myself doing A LOT! And I guess I wasn't the only one!

Previously to add an #inner wrap, for example, you had to:
[php]// Add div.wrap inside of div#inner
function child_before_content_sidebar_wrap() {
echo '<div class="wrap">';
}
add_action('genesis_before_content_sidebar_wrap', 'child_before_content_sidebar_wrap');

function child_after_content_sidebar_wrap() {
echo '</div><!-- end .wrap -->';
}
add_action('genesis_after_content_sidebar_wrap', 'child_after_content_sidebar_wrap');
[/php]

And this didn't work all the time. For example, customizing the Agency theme, it wasn't this simple. One still had to modify home.php and move a hook to make the wrap work appropriately (and I am sure that the Agency theme wasn't the only one!).

Now, it is one line of code:
[php]add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );[/php]

While this one line doesn't solve the Agency theme problem of adding a wrap, it does make adding wraps easier and simpler without any unnecessary extra code or failing to close a <div> tag at the wrong spot!

Written by Travis Smith · Categorized: Genesis

Jun 03 2011

Genesis Specific: Add Genesis SEO and Layout Options to My Custom Post Type

Understanding WordPress Custom Post Types
So if you are running on the Genesis Framework, and you've created your new custom post type. So where are the SEO options!? Well, more than likely, you didn't add support for the Genesis SEO options to your custom post types. This feature alone makes Genesis so powerful and such an awesome Theme Framework. To add the Genesis SEO options only takes one additional support code, not even one line.

Wherever you registered your custom post type, add 'genesis-seo', 'genesis-layouts' to the support array. And there it is! Genesis SEO options are now available for your custom post type! (see sample example below).

If you do not have the registration code or the plugin does not allow you to add custom support features, no problem! Just use, add_post_type_support();. In your functions.php, add the following:
[php]
add_post_type_support( 'wps_cars', 'genesis-seo' );
add_post_type_support( 'wps_cars', 'genesis-layouts' );
[/php]

It would need to occur in the 'init' hook. So, in your functions.php, it will appear as:
[php]add_action('init', 'my_custom_init');

function my_custom_init() {
add_post_type_support( 'wps_cars', 'genesis-seo' );
add_post_type_support( 'wps_cars', 'genesis-layouts' );
}

[/php]

Sample Custom Post Type Registration with Genesis SEO Support

[php highlight="26"]add_action('init', 'wps_cpt_init');
function wps_cpt_init() {
$labels= array(
'name' => _x('Cars', 'post type general name'),
'singular_name' => _x('Car', 'post type singular name'),
'add_new' => _x('Add New', 'car'),
'add_new_item' => __('Add New Car'),
'edit_item' => __('Edit Car'),
'new_item' => __('New Car'),
'view_item' => __('View Car'),
'search_items' => __('Search Car'),
'not_found' => __('No cars found'),
'not_found_in_trash' => __('No cars found in Trash'),
'parent_item_colon' => '',
'menu_name' => 'Cars'
);
$args = array(
'labels' => $labels,
'public' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','editor','author','thumbnail','genesis-seo')
);
register_post_type( 'wps_cars' , $args );
}[/php]

Written by Travis Smith · Categorized: Custom Post Types, Genesis

Jun 01 2011

Genesis Grid Loop: How to Set Features to a Specific Category and Non-Features/Grid Posts to a Separate (Another) Category

In order to set your Genesis Grid Loop 'features', which are the number of posts that will show at the top of the page when using the Grid Loop, to one specific category or categories and the non-features or grid posts to another category or set of categories, you will need to adjust your grid_loop_helper function.

Here is a simple way of displaying posts via categories via the Grid loop calling genesis_grid_loop() twice.
[php highlight="15-16, 29-30, 33-39"]function child_grid_loop_helper() {
global $paged;
if ( function_exists( 'genesis_grid_loop' ) ) {
//set featured grid_args
$grid_args_featured = array(
'features' => 1,
'feature_image_size' => 'child_full',
'feature_image_class' => 'aligncenter post-image',
'feature_content_limit' => 100,
'grid_image_size' => 'child_thumb',
'grid_image_class' => 'aligncenter post-image',
'grid_content_limit' => 0,
'more' => '',
'posts_per_page' => 1,
'post_type' => 'books_fbd',
'cat' => '8',
'paged' => $paged
);
//set non-featured grid_args
$grid_args_rest = array(
'features' => 0,
'feature_image_size' => 'child_full',
'feature_image_class' => 'aligncenter post-image',
'feature_content_limit' => 100,
'grid_image_size' => 'child_thumb',
'grid_image_class' => 'aligncenter post-image',
'grid_content_limit' => 0,
'more' => '',
'posts_per_page' => 4,
'post_type' => 'books_fbd',
'cat' => '7',
'paged' => $paged
);

//assuming that features won't go beyond 1 page
if ( ($grid_args_featured['paged'] > 1) || ($grid_args_past['paged'] > 1) )
genesis_grid_loop( $grid_args_rest ); //do not show featured after page 1
else {
genesis_grid_loop( $grid_args_featured );
genesis_grid_loop( $grid_args_rest );
}

} else {
genesis_standard_loop();
}
} [/php]

However, I have posted on the StudioPress forums, which creates another argument for 'features_cat' suggesting some edits for the genesis_grid_loop() function.

Written by Travis Smith · Categorized: Genesis, Genesis Grid Loop, Tutorials

  • « Previous Page
  • 1
  • …
  • 8
  • 9
  • 10
  • 11
  • 12
  • …
  • 20
  • Next Page »
  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in