Swap WordPress “Widget Area” based on Page Template

WOW!
well, it would seems as tho i figured it out!

after MORE searching, i came across https://learn.wordpress.org/lesson-plan/widget-areas

apparently i had to “register” a “sidebar” – which thru me, as i was wanting to modify in the footer. after looking that up, the term “sidebar” is used anywhere the theme allows the user to add widgets in. and since the Enfold theme footer allows for widgets, i had to “register_sidebar” and THEN modify a line in the template.
i also didn’t understand why i had to “register” the “widget area’s” at all, thinking that just by creating the custom widgets in WP admin > Appearance > Widgets, that should do it, but no. ya gotta create them there and ALSO register them in the child functions too.

so after reading that wordpress page (linked above), i started hunting around in the main Enfold theme files, trying to find something similar. since apparently, some things are named differently than in other themes, which is why my copy/pasting of examples i found elsewhere didn’t work.
i found it in… themes > enfold > includes > admin > register-widget-area.php

so i combined what that wordpress link offered with the footer widget registration and came up with this code that i put in my child functions.php

add_action( 'widgets_init', 'MYWIDGETAREA' );
function MYWIDGETAREA() 
{
    register_sidebar( array(
        'name'          => 'Respect Footer - Column ' . $i,
        'id'            => 'espect_foot_widget_' . $i,
        'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">',
        'after_widget'  => '<span class="seperator extralight-border"></span></section>',
        'before_title'  => '<h3 class="widgettitle">',
        'after_title'   => '</h3>'
    ));
}

in the array, i only changed the “name” & “id”, leaving the rest so the structure matches the original theme.

then i went to my template-custom.php and found this line…

if( ! ( function_exists( 'dynamic_sidebar' ) && dynamic_sidebar( 'Footer - Column ' . $i ) ) )

…and replaced it with…

if( ! ( function_exists( 'dynamic_sidebar' ) && dynamic_sidebar( 'Respect Footer - Column ' . $i ) ) )

AMAZING!!!

well hopefully all this may benefit someone else in a similar position some day.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)