Support » Plugin: Widgets on Pages » Embedding in Footer.php doesn't work

  • I’ve trawled through the topics here and the only one that might have given me any joy had the person say he’d worked it out, but not what the solution is.

    <?php widgets_on_template("wop_1"); ?>

    gives me an empty widget container and won’t display the content. When I view source, there’s only
    <li> </li>
    where my widget content ought to be and no way of calling it. I’ve used the WP_Widget php code to call the custom menu in the footer but I’d rather be able to embed the sidebar Faux_Footer in the footer so I can put more items in there if I need to.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author toddhalfpenny


    Hey Wendy,

    Sorry for the delay in replying (saw your email too)… been a little busy of late.

    Do you have a link to the page please? Also what widgets do you have in the wop_1 sidebar?


    Hi Todd,

    thanks for getting back to me. Here’s the page:

    The widget container code looks like this on the page source:

    <div id="Faux_Footer" class="widgets_on_page">
      </div><!-- widgets_on_page -->

    I’ve put a custom menu and a text widget called “Social” in there.

    The other Widgets on Pages widget containers are working as intended. This is the only way I can make this heavily customised theme look like this AND allow the client to update the content without messing it up.

    She wanted extra content in the footer, namely the custom menu and the social media buttons. I’ve put them in manually for now so when this is fixed I can take them out. Then the client can add buttons for Pinterest, etc., and add items to the menu.

    It’s just that as it is, if the theme gets updated, all that will go. I need WOP to work in the footer. I tried making a false footer and forcing it up with positioning CSS but it doesn’t look right on smaller screens.

    Thanks again,


    Plugin Author toddhalfpenny


    That’s odd. And you say that the other Widgets ON Pages sidebars are working OK?
    Have you tried calling one of them instead of wop_1? If you do, what happens?

    They’re live now and each has its own distinct name. Every bit of content on the home page is in a Widgets on Pages widget. All of it. It’s done that way to stop the client messing up the home page if she makes changes to the content.

    Their names are, from the top:

    Home Left

    Home Right

    Home Box 1

    Home Box 2

    Home Box 3

    Content Left

    Content Right

    That’s how I got that stuff to sit so neatly on the page.

    Tried Home Left in the footer. Result, on Page Source:

    <div id="Home_Left" class="widgets_on_page">
      </div><!-- widgets_on_page --></div>

    I can’t even make that show up if I put it on any other .php page. Nothing comes up in the index or home .php pages.

    I also tried deactivating all but WOP. No difference.

    Hi Todd,
    I am experiencing the same problem as Wendy, but I am using the widget in the header file.
    <div class=”description-widget” style=”border: solid 1px red;”><?php widgets_on_template(“wop_3”); ?><p>    </p></div>

    I added it just below the </hgroup>

    When I refresh the page and view source – this is what is generated:
    <div class=”description-widget” style=”border: solid 1px red;”><div id=’wop_3′ class=’widgets_on_page’>

      </div><!– widgets_on_page –><p>    </p></div>

      When I use the shortcode, it works fine. [widgets_on_pages id=3]

      Please help.

      What Carol says. The shortcode works as intended but the PHP call doesn’t. Is there a way to compensate to call the content as well as the widget shell?

      Plugin Author toddhalfpenny


      Oh dear… could you please let me know what version of WordPress you’re running and also what themes you’re using?


      I’m using Truly Minimal on the latest edition of WP.

      Plugin Author toddhalfpenny


      Hello again,

      Right… so looks like the current release doesn’t like the PHP template_tag use if you use the default sidebar name.

      I have this working on my local dev machine by doing the following;

      1. Set the Widgets on Pages sidebar name to “2nd_wop”
      2. Use the following PHP in my footer.php

      <?php widgets_on_template("2nd_wop"); ?>

      Could you please try this and let me know if it works?


      Hi Todd,

      sorry, I’ve been busy. I tried your suggestion, and this happened:

      `<div id=’2nd_wop’ class=’widgets_on_page’>
      </div><!– widgets_on_page –>`

      So basically, it doesn’t work. Did you try it on the Truly Minimal theme? Is there a way to call the content? I can call the shell, but that’s it.

      <?php echo do_shortcode(“[widgets_on_pages id=2]”); ?>

      use this way.. worked with me …

    Viewing 11 replies - 1 through 11 (of 11 total)
    • The topic ‘Embedding in Footer.php doesn't work’ is closed to new replies.