Replacing Default Footer With Custom Footer

I have created and inserted the shortcode for a custom footer into the footer.php, it was working but then when I was editing the custom footer in the Divi Library, it suddenly stopped loading, I tried creating other layouts for the footer and inserting their code but none will load now... because it's the devil...

Here is the PHP I am using for the footer,
if ( ! is_page_template( 'page-template-blank.php' ) ) : ?>

<footer id="main-footer">
<?php echo do_shortcode('[et_pb_section="26785"][/et_pb_section]':wink:; ?>
<?php get_sidebar( 'footer' ); ?>

if ( has_nav_menu( 'footer-menu' ) ) : ?>

<div id="et-footer-nav">
<div class="container">
wp_nav_menu( array(
'theme_location' => 'footer-menu',
'depth' => '1',
'menu_class' => 'bottom-nav',
'container' => '',
'fallback_cb' => '',
) );
</div> <!-- #et-footer-nav -->

I have the most recent release of Divi and WP

  • Adam Czajczyk

    Hi Matthew

    I hope you're well today and thank you for your question!

    I think I might need a bit more explanation. I see that the code is supposed to execute a shortcode if a loaded page template is "page-template-blank.php" and I understand it doesn't do this.

    Are you sure that when you're testing it it actually is the "page-template-blank.php" template that's being used? Also, where do you put that code of yours?

    If you could share a bit more details (and possibly enable support access to the site on "WPMU DEV -> Support" page in your site's back-end) that would be great. I could then check the site and hopefully help you with solving this :slight_smile:

    Best regards,

  • Matthew

    Hey Adam Czajczyk , I am doing pretty good myself except for this buthead footer! I hope you are also having a good day buddy.

    I left the key under the mat, it's on

    The code is in the footer.php for our child theme Matthew Pillado PLLC, here is the thing it was working fine, then I went to customizer and changed the footers background color, I did not do it in the module in the Divi Library which is named "Whole Footer and Popups" you won't find the pop ups in there either because for some reason despite being hidden until button is clicked, they were staying open all the time.

    When it first stopped working, I tried to instead make a Divi Layout for the Divi Library and use it's post ID instead of the single section ID I was using before, that did not work so I changed the post ID in the shortcode back to the one that had worked, but it will not load now, not sure why, I know I must be missing something and was hoping another pair of eyes might help out.

    Thanks for your time Adam, it is appreciated!

  • Predrag Dubajic

    Hi Matthew,

    It seems that your code is fine, I've used WP editor to grab the entire code and create child theme on my local installation, I did some tests, messed around with footer but nothing affected the custom code, it was always displayed properly.

    So I'm afraid that I was unable to find anything that might be causing this for you and it might be best to get in touch with Divi devs so they could have a look and give you some insight.

    Best regards,

  • Predrag Dubajic

    Hi Matthew,

    Perhaps enabling debug log can help, if there's a code issue and error happens somewhere?

    You can enable debug log in your wp-config.php file (located in root WP folder) by replacing define('WP_DEBUG', false); with this code:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set( 'display_errors', 0 );

    Visit homepage and this should create debug.log file in your wp-content folder, if there are errors, that could tell us what is going on.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.