post

How to Add Formatting Tags to Genesis’s Content Limit in Content Archives

Recently, I started limiting my content by using Display Post Content under Genesis > Theme Settings > Content Archives instead of using Display Post Excerpt. While the default is Display Post Content, the next field Limit content to ## characters is usually blank. However, I wanted to limit the content archives while maintaining my formacodeing.

So, upon limiting my content, I discovered that this actually strips all the tags except <code><script></code> and <code><style></code>. However, I wanted to allow basic formacodeing tags like <code><b></code>, <code><em></code>, and <code><br></code>. Gratefully, Genesis has a filter that will allow you to keep these tags in the content limit. To add the tags, you will need to add a filter in your functions.php.

add_filter('get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags');
function get_the_content_limit_custom_allowedtags() {
return '<script>,<style>,<b>,<br>,<em>'; //add whatever tags you want to this string
}
post

How to Widgetize the Home Page of the Expose Genesis Child Theme

In order to widgetize the Expose Child Theme, you have to do three things.

1. Edit the CSS to make .portfolio-posts absolute. So find the following CSS.

#content .portfolio-posts,  {
	background: #FFFFFF;
	float: left;
	width: 280px;
	min-height: 280px;
	margin: 0 10px 10px 10px;
	padding: 9px 9px 9px 9px;
	border: 1px solid #D5D5D5;
	display: inline;
	-moz-box-shadow: 0 0 3px #BBBBBB;
	-webkit-box-shadow: 0 0 3px #BBBBBB;
	overflow: hidden;
	}

#content .portfolio-posts h2 {
	font-size: 18px;
	}

#content .portfolio-posts p {
	line-height: 20px;
	}

and delete #content.

2. Edit functions.php to include the widgeted area. Add the following code after // Register widget areas:

genesis_register_sidebar(array(
	'name'=>'Home 1',
	'id' => 'home-1',
	'description' => 'This is the first section of the homepage.',
	'before_title'=>'<h3 class="widgettitle">','after_title'=>'</h3>'
));
genesis_register_sidebar(array(
	'name'=>'Home 2',
	'id' => 'home-2',
	'description' => 'This is the first section of the homepage.',
	'before_title'=>'<h3 class="widgettitle">','after_title'=>'</h3>'
));
genesis_register_sidebar(array(
	'name'=>'Home 3',
	'id' => 'home-3',
	'description' => 'This is the first section of the homepage.',
	'before_title'=>'<h3 class="widgettitle">','after_title'=>'</h3>'
));

3. Edit home.php to incorporate the widget. Then comment out the following:

//require_once(PARENT_DIR . '/index.php');

And add the following just after that:

get_header();
genesis_home(); ?>

<div id="content home-widgeted">
	<div class="widgeted-home home-1">
		<?php if (!dynamic_sidebar('Home 1')) : ?>
		<div class="widget">
			<h4><?php _e("Home", 'genesis'); ?></h4>
			<p><?php _e("This is a widgeted area which is called Home.", 'genesis'); ?></p>
		</div>
		<?php endif; ?>
	</div><!-- end .widgeted-home home-1-->
	<div class="widgeted-home home-2">
		<?php if (!dynamic_sidebar('Home 2')) : ?>
		<div class="widget">
			<h4><?php _e("Home", 'genesis'); ?></h4>
			<p><?php _e("This is a widgeted area which is called Home.", 'genesis'); ?></p>
		</div>
		<?php endif; ?>
	</div><!-- end .widgeted-home home-2-->
	<div class="widgeted-home home-3">
		<?php if (!dynamic_sidebar('Home 3')) : ?>
		<div class="widget">
			<h4><?php _e("Home", 'genesis'); ?></h4>
			<p><?php _e("This is a widgeted area which is called Home.", 'genesis'); ?></p>
		</div>
		<?php endif; ?>
	</div><!-- end .widgeted-home home-3-->
</div><!-- end #home-widgeted -->

<?php get_footer(); ?>

Now, Expose Home Page is widget ready to give more control on the front page. You may need to add some CSS to style even further.