WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Parse error when widgetizing theme (3 posts)

  1. jstgtpaid
    Member
    Posted 6 years ago #

    I am trying to widgetize a theme using the techniques described at this site . I modified the original format of the sidebar.php file to utilize good sidebar markup as described in the above page and it works great.

    I created the functions.php file and added the following into that file...

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar();
    ?>

    When I add the following code to my sidebar.php file it creates a parse error...

    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar() ) : ?>

    Any ideas on how I could fix this or where I could look for additional information?

    Thanks in advance,
    Steven

  2. Jeremy Clark
    Moderator
    Posted 6 years ago #

    At the end of your sidebar you need to add the end of the if statement
    <?php endif; ?>

  3. jstgtpaid
    Member
    Posted 6 years ago #

    You are awesome Jeremy That worked.

    Thanks...

Topic Closed

This topic has been closed to new replies.

About this Topic