All my Widgets Are Lost!!

Homepage Community Forums Aspire Theme Support All my Widgets Are Lost!!

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #19906
    ArtistClara
    Customer

      I used the appearance–>customize—>colors to try out a new color and I’ve lost all the work I’ve done. All my front page widgets are gone. I thought that feature is to help change theme colors easily. It’s wiped everything I’ve done on the front page.

      #19907
      ArtistClara
      Customer

        Widgets – not Midgets

        #19909
        Wes
        Moderator

          Did you want me to login to your WordPress admin to take a look? I’ve never seen or heard of that happening before.

          #19910
          ArtistClara
          Customer

            sure, feel free to take a look.

            #19911
            Wes
            Moderator
              This reply has been marked as private.
              #19912
              ArtistClara
              Customer

                I did send it already. Let me know if you can’t find it. I’ll look through my emails.

                #19913
                Wes
                Moderator

                  Looks like the issue is coming from an edit/customization made from your functions file. You made some modifications to it recently and there is an error somewhere within the code.

                  Do you remember which part of the code you edited recently? That should help me find out where the issue is coming from.

                  #19914
                  ArtistClara
                  Customer

                    The most recent edit was to comment out the featured image appearing on top of blog posts.

                    #19915
                    Wes
                    Moderator

                      Never mind I find out what it is. When you commented the featured image code, you added // for each line.

                      // Add featured image above the entry content
                      //add_action( 'genesis_before_entry', 'aspire_featured_photo' );
                      //function aspire_featured_photo() {
                      
                      //    if ( ! ( is_singular() && has_post_thumbnail() ) ) {
                              return;
                      //    }
                      
                      //    $image = genesis_get_image( 'format=url&size=single-posts' );
                      
                      //    $thumb_id = get_post_thumbnail_id( get_the_ID() );
                      //    $alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
                      
                      //    if ( '' == $alt ) {
                              $alt = the_title_attribute( 'echo=0' );
                      //    }
                      
                      //    printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', esc_url( $image ), $alt );
                      //

                      Instead of trying to figure out exactly which line the error was coming from, I removed all of the // from that block of code, and added /* and */ at the beginning and the very end of the code. Like this –

                      // Add featured image above the entry content
                      /*add_action( 'genesis_before_entry', 'aspire_featured_photo' );
                      function aspire_featured_photo() {
                      
                          if ( ! ( is_singular() && has_post_thumbnail() ) ) {
                              return;
                          }
                      
                          $image = genesis_get_image( 'format=url&size=single-posts' );
                      
                          $thumb_id = get_post_thumbnail_id( get_the_ID() );
                          $alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
                      
                          if ( '' == $alt ) {
                              $alt = the_title_attribute( 'echo=0' );
                          }
                      
                          printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', esc_url( $image ), $alt );
                      */

                      In the future if you ever need to comment out a whole block of code like this, I’d recommend just adding /* and */ at the beginning and end of the code.

                      Your widgets are available now, so you can go and move them back where they were on your homepage.

                      You can still use the Customizer to change colors, the only reason your widgets didn’t show up is because of that error above. So you should be good to go. Let me know if there’s still an issue.

                      #19916
                      ArtistClara
                      Customer

                        Thanks so much Wes. No, I’m not going to try changing colors anymore 馃檪

                        #19919
                        Wes
                        Moderator

                          You’re Welcome!

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • You must be logged in to reply to this topic.