new widgets not showing up

Homepage Community Forums Ally Theme Support new widgets not showing up

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2261
    Cove145
    Customer

      Hi Wes.  I put in the widgets from Optimal, but they won’t show up.  Sure I am missing something simple but I can’t figure it out.  My Home.php is below, can you tell where I went wrong?

      <?php

      add_action( ‘genesis_meta’, ‘ally_home_genesis_meta’ );
      /**
      * Add widget support for homepage. If no widgets active, display the default loop.
      *
      */
      function ally_home_genesis_meta() {

      if ( is_active_sidebar( ‘slider’ ) || is_active_sidebar( ‘welcome’ ) || is_active_sidebar( ‘home-feature-middle-sidebar’ ) || is_active_sidebar( ‘home-feature-middle-1’ ) || is_active_sidebar( ‘home-feature-middle-2’ ) || is_active_sidebar( ‘home-feature-middle-3’ ) || is_active_sidebar( ‘home-feature-middle-4’ ) || is_active_sidebar( ‘home-feature-1’ ) || is_active_sidebar( ‘home-feature-2’ ) || is_active_sidebar( ‘home-feature-3’ ) || is_active_sidebar( ‘home-middle-wide’ ) || is_active_sidebar( ‘home-middle-sidebar-1’ ) ||  is_active_sidebar( ‘home-middle-sidebar-2’ ) || is_active_sidebar( ‘home-bottom-sidebar-1’ ) || is_active_sidebar( ‘home-bottom-sidebar-2’ ) || is_active_sidebar( ‘home-bottom-sidebar-3’ ) || is_active_sidebar( ‘home-bottom-sidebar-4’ ) ||  is_active_sidebar( ‘home-bottom-wide’ ) ) {

      remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
      add_action( ‘genesis_after_header’, ‘ally_home_loop_helper_top’ );
      add_action( ‘genesis_after_header’, ‘ally_home_loop_helper_feature’ );
      add_action( ‘genesis_after_header’, ‘ally_home_loop_helper_middle’ );
      add_action( ‘genesis_after_header’, ‘ally_home_loop_helper_bottom’ );
      add_action( ‘genesis_after_header’, ‘ally_home_loop_helper_bottom_wide’ );
      add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

      }
      }

      /**
      * Display widget content for “slider” and “welcome” sections.
      *
      */
      function ally_home_loop_helper_top() {

      if ( is_active_sidebar( ‘slider’ ) ) {
      echo ‘<div id=”slider-wrap”><div class=”slider-inner”>’;
      dynamic_sidebar( ‘slider’ );
      echo ‘</div><!– end .slider-wrap –></div><!– end #slider-inner –>’;
      }

      if ( is_active_sidebar( ‘welcome’ ) ) {
      echo ‘<div id=”welcome”><div class=”welcome-inner”>’;
      dynamic_sidebar( ‘welcome’ );
      echo ‘</div><!– end .welcome-inner –></div><!– end #welcome –>’;
      }

      }

      /**
      * Display widget content for “Home Feature Middle” sections.
      *
      */
      function optimal_home_loop_helper_feature_middle() {

      echo ‘<div class=”home-feature-middle-wrap”>’;

      if ( is_active_sidebar( ‘home-feature-middle-sidebar’ ) ) {
      echo ‘<div class=”home-feature-middle-sidebar”>’;
      dynamic_sidebar( ‘home-feature-middle-sidebar’ );
      echo ‘</div><!– end .home-feature-middle-sidebar –>’;
      }

      echo ‘<div class=”home-feature-middle-section”>’;

      if ( is_active_sidebar( ‘home-feature-middle-1’ ) ) {
      echo ‘<div class=”home-feature-middle-1″>’;
      dynamic_sidebar( ‘home-feature-middle-1’ );
      echo ‘</div><!– end .home-feature-middle-1 –>’;
      }

      if ( is_active_sidebar( ‘home-feature-middle-2’ ) ) {
      echo ‘<div class=”home-feature-middle-2″>’;
      dynamic_sidebar( ‘home-feature-middle-2’ );
      echo ‘</div><!– end .home-feature-middle-2 –>’;
      }

      if ( is_active_sidebar( ‘home-feature-middle-3’ ) ) {
      echo ‘<div class=”home-feature-middle-3″>’;
      dynamic_sidebar( ‘home-feature-middle-3’ );
      echo ‘</div><!– end .home-feature-middle-3 –>’;
      }

      if ( is_active_sidebar( ‘home-feature-middle-4’ ) ) {
      echo ‘<div class=”home-feature-middle-4″>’;
      dynamic_sidebar( ‘home-feature-middle-4’ );
      echo ‘</div><!– end .home-feature-middle-4 –>’;
      }

      echo ‘</div><!– end #home-feature-middle-section –></div><!– end #home-feature-middle-wrap –>’;

      }

      /**
      * Display widget content for the “Home Feature” section.
      *
      */
      function ally_home_loop_helper_feature() {

      if ( is_active_sidebar( ‘home-feature-1’ ) || is_active_sidebar( ‘home-feature-2’ ) || is_active_sidebar( ‘home-feature-3’ ) || is_active_sidebar( ‘home-feature-4’ ) ) {

      echo ‘<div id=”home-feature-wrap”>’;

      if ( is_active_sidebar( ‘home-feature-1’ ) ) {
      echo ‘<div class=”home-feature-1″>’;
      dynamic_sidebar( ‘home-feature-1’ );
      echo ‘</div><!– end .home-feature-1 –>’;
      }

      if ( is_active_sidebar( ‘home-feature-2’ ) ) {
      echo ‘<div class=”home-feature-2″>’;
      dynamic_sidebar( ‘home-feature-2’ );
      echo ‘</div><!– end .home-feature-2 –>’;
      }

      if ( is_active_sidebar( ‘home-feature-3’ ) ) {
      echo ‘<div class=”home-feature-3″>’;
      dynamic_sidebar( ‘home-feature-3’ );
      echo ‘</div><!– end .home-feature-3 –>’;
      }

      echo ‘</div><!– end #home-feature-wrap –>’;

      }

      }

      /**
      * Display widget content for “Home Middle” section.
      *
      */
      function ally_home_loop_helper_middle() {

      if ( is_active_sidebar( ‘home-middle-wide’ ) || is_active_sidebar( ‘home-middle-sidebar-1’ ) || is_active_sidebar( ‘home-middle-sidebar-2’ ) ) {

      echo ‘<div id=”home-middle”>’;

      if ( is_active_sidebar( ‘home-middle-wide’ ) ) {
      echo ‘<div class=”home-middle-wide”>’;
      dynamic_sidebar( ‘home-middle-wide’ );
      echo ‘</div><!– end .home-middle-wide –>’;
      }

      if ( is_active_sidebar( ‘home-middle-sidebar-1’ ) ) {
      echo ‘<div class=”home-middle-sidebar-1″>’;
      dynamic_sidebar( ‘home-middle-sidebar-1’ );
      echo ‘</div><!– end .home-middle-sidebar-1 –>’;
      }

      if ( is_active_sidebar( ‘home-middle-sidebar-2’ ) ) {
      echo ‘<div class=”home-middle-sidebar-2″>’;
      dynamic_sidebar( ‘home-middle-sidebar-2’ );
      echo ‘</div><!– end .home-middle-sidebar-2 –>’;
      }

      echo ‘</div><!– end #home-middle –>’;

      }

      }

      /**
      * Display widget content for the “Home Bottom” section.
      *
      */
      function ally_home_loop_helper_bottom() {

      if ( is_active_sidebar( ‘home-bottom-sidebar-1’ ) || is_active_sidebar( ‘home-bottom-sidebar-2’ ) || is_active_sidebar( ‘home-bottom-sidebar-3’ ) || is_active_sidebar( ‘home-bottom-sidebar-4’ ) ) {

      echo ‘<div id=”home-bottom”>’;

      if ( is_active_sidebar( ‘home-bottom-sidebar-1’ ) ) {
      echo ‘<div class=”home-bottom-sidebar-1″>’;
      dynamic_sidebar( ‘home-bottom-sidebar-1’ );
      echo ‘</div><!– end .home-bottom-sidebar-1 –>’;
      }

      if ( is_active_sidebar( ‘home-bottom-sidebar-2’ ) ) {
      echo ‘<div class=”home-bottom-sidebar-2″>’;
      dynamic_sidebar( ‘home-bottom-sidebar-2’ );
      echo ‘</div><!– end .home-bottom-sidebar-2 –>’;
      }

      if ( is_active_sidebar( ‘home-bottom-sidebar-3’ ) ) {
      echo ‘<div class=”home-bottom-sidebar-3″>’;
      dynamic_sidebar( ‘home-bottom-sidebar-3’ );
      echo ‘</div><!– end .home-bottom-sidebar-3 –>’;
      }

      if ( is_active_sidebar( ‘home-bottom-sidebar-4’ ) ) {
      echo ‘<div class=”home-bottom-sidebar-4″>’;
      dynamic_sidebar( ‘home-bottom-sidebar-4’ );
      echo ‘</div><!– end .home-bottom-sidebar-4 –>’;
      }

      echo ‘</div><!– end #home-bottom –>’;

      }

      }

      /**
      * Display widget content for the “Home Bottom” section.
      *
      */
      function ally_home_loop_helper_bottom_wide() {

      if ( is_active_sidebar( ‘home-bottom-wide’ ) ) {
      echo ‘<div id=”home-bottom-wide”><div class=”wrap”>’;
      dynamic_sidebar( ‘home-bottom-wide’ );
      echo ‘</div><!– end .wrap –></div><!– end #home-bottom-wide –>’;
      }

      }

      genesis();

      #2263
      Cove145
      Customer

        OK, I got this one fixed.

        #2268
        Eric
        Customer

          Since you got this one working I’ll go ahead and close the thread.  Let us know if you need anything else.

          Thanks


          I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘new widgets not showing up’ is closed to new replies.