WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a custom plugin that activates a custom contact form widget, and when I add it to my sidebar, it appears outside of the sidebar container.

Here's the code for calling the sidebar:

<div class="sidebar">
    <?php get_sidebar(); ?>

Here's the visual part of the widget: (It's not done yet)

  function widget($args, $instance)
    extract($args, EXTR_SKIP);

    echo $before_widget;
    $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);

    if (!empty($title))
      echo $before_title . $title . $after_title;;

        <lable>First Name</lable>
        <input type="text" id="firstname" />

    echo $after_widget;

How it appears:

<div class="sidebar">
    //search form code here
<div class="contact....>
     //contact form code here

What could possibly cause it to behave like that?

P.S: If anything else is needed, let me know.

share|improve this question
Browsers sometimes show something like this in DevTools, when there are errors in HTML. Are you showing output of DevTools or View source method? – Krzysiek Dróżdż Jul 2 '13 at 11:48
Yea, I use Chrome. I double checked my HTML, though... – Asaf Jul 2 '13 at 11:51
Nevermind! Found the mistake! I edited the search form in my functions.php file, and apparently I left out a closing <div> tag, which resulted in this behavior. Sorry and thanks! – Asaf Jul 2 '13 at 11:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.