Community Forums › Forums › Archived Forums › General Discussion › hooked in content (left) with widget sidebar (right)
- This topic has 2 replies, 2 voices, and was last updated 11 years ago by Ben Siegfried.
-
AuthorPosts
-
March 31, 2013 at 6:57 pm #32372Ben SiegfriedMember
I'm exploring different methods for layout and content with the theme Agency. I have created this so far: http://siegfriedmedia.com/rivasrocks/ adding blog posts as content with the widget area on right.
Using the same layout, how would I alter the home.php file to instead hook in html content (I know how to hook in the content if this is possible) on the left while still retaining a widget area on the right?
Commenting out the following brought in the posts as I have it now (home.php):
<code>
<?php
add_action( 'genesis_meta', 'agency_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function agency_home_genesis_meta() {if ( is_active_sidebar( 'home-welcome' ) || is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) {
//remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_after_header', 'agency_home_welcome_helper' );
//add_action( 'genesis_loop', 'agency_home_loop_helper' );
//add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
add_filter( 'body_class', 'add_body_class' );function add_body_class( $classes ) {
$classes[] = 'agency';
return $classes;
}}
}function agency_home_welcome_helper() {
if ( is_active_sidebar( 'home-slider' ) ) {
echo '<div id="home-slider">';
dynamic_sidebar( 'home-slider' );
echo '</div><!-- end #home-slider -->';
}if ( is_active_sidebar( 'home-welcome' ) ) {
echo '<div id="home-welcome">';
dynamic_sidebar( 'home-welcome' );
echo '</div><!-- end #home-welcome -->';
}}
function agency_home_loop_helper() {
if ( is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) {
echo '<div id="home">';
echo '<div class="home-left">';
dynamic_sidebar( 'home-left' );
echo '</div><!-- end .home-left -->';echo '<div class="home-middle">';
dynamic_sidebar( 'home-middle' );
echo '</div><!-- end .home-middle -->';echo '<div class="home-right">';
dynamic_sidebar( 'home-right' );
echo '</div><!-- end .home-right -->';echo '</div><!-- end #home -->';
}
}
genesis();</code>
April 1, 2013 at 2:28 am #32401Brad DaltonParticipantHi.
I think you need to make a decision on which platform you want to use for your top level domain.
You are currently using other software which makes it more complicated and difficult to manage.
Hacking the home.php file isn't best practice especially when you can use your child themes functions.php.
April 1, 2013 at 9:01 pm #32568Ben SiegfriedMemberThanks Brad!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.