Add section above footer in WP

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
jess88
New php-forum User
New php-forum User
Posts: 3
Joined: Mon Jun 26, 2017 10:41 am

Wed Mar 25, 2020 10:10 am

HELLO ~

I am a PHP luddite and I need to add a section above the footer in a client's WP website. I am working in the footer.php file in the child theme directory.

The site is here:
https://changing-places.com/
On that page and other pages, the section has been added manually and says Are You Ready to Get Organized? with a fleur de lys background image and a little form.
I need to add that section via the footer.php file instead of manually so I am not adding it each time I add a page or post.

See the coding below that I need to add. When I add it, most of the content goes to the right place (right above the footer), but the main nav stops working and the background image shows up in the middle of the whole page instead of just the section that I am adding.

1. Not sure how to keep the background image in the section I am adding,
2. and not sure why the main nav stops working.

I would love some help here!

Thanks so much.

Code: Select all

<section class="builder-section-prev-text builder-section builder-section-text builder-section-last has-background builder-text-columns-1">
            <div class="container" style="background-image: url(&#039;https://changing-places.com/wp-content/uploads/2020/02/img_fleur_behind_CTA.jpg&#039;);background-size: contain; background-repeat: no-repeat;background-position: center center;">
<div class="builder-section-content">
<div class="builder-text-row">
<div class="builder-text-column builder-text-column-1">
<div class="builder-text-content">
<div style="font-family: 'Playfair Display', serif; font-size: 60pt !important; line-height: 100% !important; color: #302d74 !important; text-align: center; margin-bottom: 15pt;">Are You Ready<br />
To Get Organized?</div>
<div style="font-size: 20pt !important; color: #302d74 !important; text-align: center;">Let&#8217;s get your project moving today</div>
<div style="margin-top: 15pt;"></div>
</p></div>
</p></div>
</p></div>
<div class="builder-text-row">
<div class="builder-text-column builder-text-column-2">
<div class="builder-text-content">

                <div class='gf_browser_chrome gform_wrapper cta-form_wrapper' id='gform_wrapper_1' ><div id='gf_1' class='gform_anchor' tabindex='-1'></div><form method='post' enctype='multipart/form-data' target='gform_ajax_frame_1' id='gform_1' class='cta-form' action='/unpacking-organizing/#gf_1'>
                        <div class='gform_body'><ul id='gform_fields_1' class='gform_fields top_label form_sublabel_below description_below'><li id='field_1_6'  class='gfield gf_left_third gfield_contains_required field_sublabel_below field_description_below hidden_label gfield_visibility_visible' ><label class='gfield_label' for='input_1_6' >NAME<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_6' id='input_1_6' type='text' value='' class='medium'    placeholder='NAME' aria-required="true" aria-invalid="false" /></div></li><li id='field_1_5'  class='gfield gf_middle_third gfield_contains_required field_sublabel_below field_description_below hidden_label gfield_visibility_visible' ><label class='gfield_label' for='input_1_5' >EMAIL<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_5' id='input_1_5' type='text' value='' class='medium'   placeholder='EMAIL' aria-required="true" aria-invalid="false" />
                        </div></li><li id='field_1_3'  class='gfield gf_right_third field_sublabel_below field_description_below hidden_label gfield_visibility_visible' ><label class='gfield_label' for='input_1_3' >Service</label><div class='ginput_container ginput_container_select'><select name='input_3' id='input_1_3' class='medium gfield_select'    aria-invalid="false"><option value='' selected='selected' class='gf_placeholder'>SERVICE</option><option value='Concierge Services' >Concierge Services</option><option value='Moving &amp; Relocation' >Moving &amp; Relocation</option><option value='Organizing' >Organizing</option><option value='Staging' >Staging</option><option value='Estate Resolution' >Estate Resolution</option><option value='Downsizing' >Downsizing</option><option value='Home Renovations &amp; Remodeling' >Home Renovations &amp; Remodeling</option><option value='Assistance for Realtors' >Assistance for Realtors</option><option value='Other' >Other</option></select></div></li><li id='field_1_7'  class='gfield gform_validation_container field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_1_7' >Name</label><div class='ginput_container'><input name='input_7' id='input_1_7' type='text' value='' /></div><div class='gfield_description' id='gfield_description__7'>This field is for validation purposes and should be left unchanged.</div></li>
                            </ul></div>
        <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_1' class='gform_button button' value='SUBMIT'  onclick='if(window["gf_submitting_1"]){return false;}  window["gf_submitting_1"]=true;  ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_1"]){return false;} window["gf_submitting_1"]=true;  jQuery("#gform_1").trigger("submit",[true]); }' /> <input type='hidden' name='gform_ajax' value='form_id=1&amp;title=&amp;description=&amp;tabindex=0' />
            <input type='hidden' class='gform_hidden' name='is_submit_1' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='1' />
            
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_1' value='WyJbXSIsIjE2NTFjMTNiMTVjMmRiNWM2NDlkODljNmZmYjllNmFmIl0=' />
            <input type='hidden' class='gform_hidden' name='gform_target_page_number_1' id='gform_target_page_number_1' value='0' />
            <input type='hidden' class='gform_hidden' name='gform_source_page_number_1' id='gform_source_page_number_1' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div>
                <iframe style='display:none;width:0px;height:0px;' src='about:blank' name='gform_ajax_frame_1' id='gform_ajax_frame_1'>This iframe contains the logic required to handle Ajax powered Gravity Forms.</iframe>
                <script type='text/javascript'>jQuery(document).ready(function($){gformInitSpinner( 1, 'https://changing-places.com/wp-content/plugins/gravityforms/images/spinner.gif' );jQuery('#gform_ajax_frame_1').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_1');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_1').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_1').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_1').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_1').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */ jQuery(document).scrollTop(jQuery('#gform_wrapper_1').offset().top - mt); }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_1').val();gformInitSpinner( 1, 'https://changing-places.com/wp-content/plugins/gravityforms/images/spinner.gif' );jQuery(document).trigger('gform_page_loaded', [1, current_page]);window['gf_submitting_1'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery('#gform_wrapper_1').replaceWith(confirmation_content);jQuery(document).scrollTop(jQuery('#gf_1').offset().top - mt);jQuery(document).trigger('gform_confirmation_loaded', [1]);window['gf_submitting_1'] = false;}, 50);}else{jQuery('#gform_1').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger('gform_post_render', [1, current_page]);} );} );</script><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 1) {if(typeof Placeholders != 'undefined'){
                        Placeholders.enable();
                    }} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [1, 1]) } ); </script>
</p></div>
</p></div>
</p></div>
</p></div></div><div>
</section>
Post Reply