WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Aug 03 2011

How to Force a Specific Layout for a Page Template in Genesis

The other day, I was creating a page template using the standard approach used in forcing a specific layout. However, when using page templates, this will work if they have not selected a specific layout on the page in the Genesis Layouts metabox. So you could either hide the Genesis metabox, or you can have the page template ignore any changes made in the layout metabox (less coding!).

The normal procedure is as follows:

[php]
add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content');
[/php]

However, this ignores any custom fields that may upset this. So since this is pre_get_option_*, the user can accidentally over-ride the "forced" specific layout. So if you don't want the user to over-ride it you need to go a step further. You can add one more line of code to correct and ensure that a page can never have a different layout. One way is to set the post meta to always be whatever you want.

[php]
global $post;
// Force Page Layout for Page Template
update_post_meta( $post->ID, '_genesis_layout', 'full-width-content' );
[/php]

However, the Genesis approach would be to set it via the pre site layout Filter.

Written by Travis Smith · Categorized: Genesis, Tutorials

Aug 02 2011

Pinkalicious Release Sale!

Pinkalicious is not ‘just another WordPress theme’. It has built in features that will get your website up and running quickly, and it will look delicious! Featuring an awesome pink and chocolate color pallette, it is the perfect theme for blogs or even an eCommerce site. [purchase_link id="15517" text="Purchase" style="button" color="gray"]

Pinkalicious
Click for a Larger Image

The home page features an image slider that will allow you to present your posts, products, or services in a spectacular fashion. An optional 1, 2, or 3 column widgetized area under the slider is a quick and painless way to present your most critical information in a way that you want. Furthermore, it is packaged with a portfolio page template making portfolios easy!

Pinkalicious also has some funaliciousness! Introducing two unique features:

  1. the very first Grid Page Template and
  2. the very first Grid Posts widget

While both of these features are based on the Genesis Grid Loop, there isn't a single Genesis Child theme that has incorporated these features so integrated and easy to use. These fantastic features also make Genesis Grids easy to implement for any category, term, taxonomy, or post type regardless of location. Do you want one category for features and another for grid posts? NO Problem! It is completely flexible, and easy to use!

The theme is extensively styled and the color scheme is very … pinkalicious.

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

Written by Travis Smith · Categorized: WordPress

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

  • « Previous Page
  • 1
  • …
  • 34
  • 35
  • 36
  • 37
  • 38
  • …
  • 60
  • Next Page »

Need Help?

Please let us know how we can help you!

Get Help

Recommendations

Genesis WordPress Framework
Sucuri Security
Gravity Forms
GetSoliloquy
Get Envira
Scribe SEO
BackupBuddy
WordPress Video User Manuals

Recent Posts

  • Solving WordPress 5XX Server Errors on SiteGround
  • Hiding an User in the WordPress Admin
  • Custom Rewrite Rules for Custom Post Types and Taxonomies
  • WordPress JavaScript Manager Native Functions
  • Causes of WordPress Site Performance Slowdown

About Travis

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

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