Community Forums › Forums › Archived Forums › Design Tips and Tricks › Problem editing Enterprise home template
- This topic has 7 replies, 2 voices, and was last updated 11 years, 11 months ago by SoZo.
-
AuthorPosts
-
January 30, 2013 at 5:17 pm #16559tuAtlasMember
Hi I have a similar problem but this is on enterprice theme (Version 1.1)
I made a few modifications to the home.php namely remove the wp-cycle short code and added:
if ( is_active_sidebar( 'home-top-2' ) ) { echo '<div class="home-top-2">'; dynamic_sidebar( 'home-top-2' ); echo '</div><!-- end .home-top-2 -->';
So that I could use an easy rotator plug in and it works. However now I get post showing up at home-middle-1 and if I remove the post I get a
"Sorry, no posts matched your criteria" notification. I am not sure from the above answer what to add from that to resolve this.
I am also NOT sure that removing and adding the above caused the problem because it did not show up until now after I dont know how many changes I made.
The site is: http://www.laboratoriocdc.net/
Thanks.
January 30, 2013 at 6:20 pm #16587SoZoMemberIs that the only thing you changed in home.php? Post the entire content of home.php so I can take a look
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 8:34 pm #16634tuAtlasMemberHi Mr. Wright,
It is the only thing I changed there. Here is the code:
<?php /** * This file handles the output on the homepage. */ add_action( 'genesis_after_header', 'enterprise_home_top_helper' ); /** * Conditionally add Home Top #1 (home-top-1) sidebar and WP-Cycle. */ function enterprise_home_top_helper() { echo '<div id="home-top-bg"><div id="home-top"><div class ="wrap">'; if ( is_active_sidebar( 'home-top-1' ) ) { echo '<div class="home-top-1">'; dynamic_sidebar( 'home-top-1' ); echo '</div><!-- end .home-top-1 -->'; } if ( is_active_sidebar( 'home-top-2' ) ) { echo '<div class="home-top-2">'; dynamic_sidebar( 'home-top-2' ); echo '</div><!-- end .home-top-2 -->'; } echo '</div><!-- end .wrap --></div><!-- end #home-top --></div><!-- end #home-top-bg -->'; } add_action( 'genesis_meta', 'enterprise_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function enterprise_home_genesis_meta() { if ( is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) ) { remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'enterprise_home_loop_helper' ); add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); } } function enterprise_home_loop_helper() { echo '<div id="home-middle">'; if ( is_active_sidebar( 'home-middle-1' ) ) { echo '<div class="home-middle-1">'; dynamic_sidebar( 'home-middle-1' ); echo '</div><!-- end .home-middle-1 -->'; } if ( is_active_sidebar( 'home-middle-2' ) ) { echo '<div class="home-middle-2">'; dynamic_sidebar( 'home-middle-2' ); echo '</div><!-- end .home-middle-2 -->'; } if ( is_active_sidebar( 'home-middle-3' ) ) { echo '<div class="home-middle-3">'; dynamic_sidebar( 'home-middle-3' ); echo '</div><!-- end .home-middle-3 -->'; } echo '</div><!-- end #home-middle -->'; } genesis();
Thanks.
January 30, 2013 at 8:47 pm #16640SoZoMemberReplace all that with this and let me know what happens
<?php /** * This file handles the output on the homepage. */ add_action( 'genesis_after_header', 'enterprise_home_top_helper' ); /** * Conditionally add Home Top #1 (home-top-1) sidebar and WP-Cycle. */ function enterprise_home_top_helper() { echo '<div id="home-top-bg"><div id="home-top"><div class ="wrap">'; if ( is_active_sidebar( 'home-top-1' ) ) { echo '<div class="home-top-1">'; dynamic_sidebar( 'home-top-1' ); echo '</div><!-- end .home-top-1 -->'; } echo '<div class="home-top-2">'; dynamic_sidebar( 'home-top-2' ); echo '</div><!-- end .home-top-2 -->'; echo '</div><!-- end .wrap --></div><!-- end #home-top --></div><!-- end #home-top-bg -->'; } add_action( 'genesis_meta', 'enterprise_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function enterprise_home_genesis_meta() { if ( is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) ) { remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'enterprise_home_loop_helper' ); add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); } } function enterprise_home_loop_helper() { echo '<div id="home-middle">'; if ( is_active_sidebar( 'home-middle-1' ) ) { echo '<div class="home-middle-1">'; dynamic_sidebar( 'home-middle-1' ); echo '</div><!-- end .home-middle-1 -->'; } if ( is_active_sidebar( 'home-middle-2' ) ) { echo '<div class="home-middle-2">'; dynamic_sidebar( 'home-middle-2' ); echo '</div><!-- end .home-middle-2 -->'; } if ( is_active_sidebar( 'home-middle-3' ) ) { echo '<div class="home-middle-3">'; dynamic_sidebar( 'home-middle-3' ); echo '</div><!-- end .home-middle-3 -->'; } echo '</div><!-- end #home-middle -->'; } genesis();
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 31, 2013 at 7:03 am #16728tuAtlasMemberThanks. I made the change you suggested but the issue remains.
January 31, 2013 at 1:36 pm #16804SoZoMemberHave you deactivated all plugins to rule out conflicts?
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 31, 2013 at 11:54 pm #16997tuAtlasMemberOk I think I found the culprit. I had a Genesis Post Teasers plug in and when I deactivated this that “Sorry, no posts matched your criteria” notification desapeared.
Ok, I`ll see what I do with this plug in or if I use it at all.
Thanks for the help.
February 1, 2013 at 8:22 am #17046SoZoMember -
AuthorPosts
- The topic ‘Problem editing Enterprise home template’ is closed to new replies.