Problem editing Enterprise home template

Community Forums Forums Design Tips and Tricks Problem editing Enterprise home template

This topic is: resolved

This topic contains 7 replies, has 2 voices, and was last updated by  SoZo 1 year, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #16559

    tuAtlas
    Participant
    Post count: 13

    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:

    [code]if ( is_active_sidebar( 'home-top-2' ) ) {
    echo '<div class="home-top-2">';
    dynamic_sidebar( 'home-top-2' );
    echo '</div><!-- end .home-top-2 -->';[/code]

    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.


    #16587

    SoZo
    Moderator
    Post count: 1573

    Is 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

    #16634

    tuAtlas
    Participant
    Post count: 13

    Hi Mr. Wright,

    It is the only thing I changed there. Here is the code:

    [php] <?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();[/php]

    Thanks.


    #16640

    SoZo
    Moderator
    Post count: 1573

    Replace all that with this and let me know what happens
    [php]<?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();[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16728

    tuAtlas
    Participant
    Post count: 13

    Thanks. I made the change you suggested but the issue remains.


    #16804

    SoZo
    Moderator
    Post count: 1573

    Have you deactivated all plugins to rule out conflicts?


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16997

    tuAtlas
    Participant
    Post count: 13

    Ok 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.

     

     

     


    #17046

    SoZo
    Moderator
    Post count: 1573

    You’re welcome :)


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Problem editing Enterprise home template’ is closed to new replies.