Homepage › Community Forums › Aspire Theme Support › All my Widgets Are Lost!!
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.
Widgets – not Midgets
Did you want me to login to your WordPress admin to take a look? I’ve never seen or heard of that happening before.
sure, feel free to take a look.
I did send it already. Let me know if you can’t find it. I’ll look through my emails.
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.
The most recent edit was to comment out the featured image appearing on top of blog posts.
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.
Thanks so much Wes. No, I’m not going to try changing colors anymore 馃檪
You’re Welcome!