• Resolved thegh0sts

    (@thegh0sts)


    Hi all,

    I have tried the link below to add a footer widget:

    https://www.tipsandtricks-hq.com/how-to-add-widgets-to-wordpress-themes-footer-1033

    and whenever I put the following code into the footer.php i get a parsing error caused by an unexpected ‘{‘.

    <div id="footer-sidebar" class="secondary">
    <div id="footer-sidebar-1">
    <?php
    if(is_active_sidebar('footer-sidebar-1')) {
    dynamic_sidebar('footer-sidebar-1');
    }
    ?>
    </div>
    </div>

    I have registered the area in my functions.php file but it is not showing the footer.

Viewing 1 replies (of 1 total)
  • Thread Starter thegh0sts

    (@thegh0sts)

    OK, I did a bit of fiddling with the code and I removed the if statement that surrounded ‘dynamic_sidebar(‘footer-sidebar-1′);’ and now it works :p

Viewing 1 replies (of 1 total)

The topic ‘Parsing error when adding footer widget area’ is closed to new replies.