• Resolved stompfrog

    (@stompfrog)


    Hi all,

    I have a wordpress theme which includes a custom sidebar.php file which I have created. This all works fine. I have a new requirement for a free html pod to be added to the sidebar and thought I would be able to use the standard wordpress text widget to achieve this.

    However… when I add the text widget to the sidebar in the widgets section of the admin panel the new widget sidebar completely replaces the existing custom sidebar.php sidebar.

    My question is how can I make use of the built in widgets alongside my own sidebar.php?

    Thanks in advance.

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

    (@stompfrog)

    Why do I always answer my own questions just after I give up and post on a forum…

    Answer for anyone else with this problem is make sure you do not have the following line of code or similar in your sidebar.php… oops!

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    //sidebar code here
    <?php endif; ?>
Viewing 1 replies (of 1 total)

The topic ‘Adding widgets to sidebar overwrites custom sidebar’ is closed to new replies.