Support » Networking WordPress » Hook/Filter/add_action to the sidebar

  • leisegang

    (@leisegang)


    <?php function global_footer () { ?>
    STUFF
    <?php } add_action(‘wp_footer’, ‘global_footer’);?>

    When i add code in STUFF it gets in the footer on ALL blogs on my multisite install.

    Is there any function for doint this in the sidebar?
    I need to add some content at the bottom of all sidebars sitewide.

    Please help me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Not without editing the sidebar.php I don’t think.

    No, there’s no sidebar hooks. Not built in to WordPress itself.

    leisegang

    (@leisegang)

    Why not?

    Shouldnt there be?

    How can i add content to the sidebar without having it as a widget and not editing theme files?

    Because a lot of themes i have exists in newer versions but i dont want to upgrade because i have edited the sidebar.php now. And it takes some time doing that with 100 themes.

    any other solution for me? plugin or something in mu-plugins folder?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Not really. Header and Footer are required elements. Sidebar is not. I have themes without one, or with my widgets all over the place.

    You know if you make a Child Theme, then you can edit your theme AND be able to upgrade the master theme 🙂

    How can i add content to the sidebar without having it as a widget and not editing theme files?

    You can’t.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hook/Filter/add_action to the sidebar’ is closed to new replies.