WordPress.org

Ready to get started?Download WordPress

Forums

Hook/Filter/add_action to the sidebar (6 posts)

  1. leisegang
    Member
    Posted 3 years ago #

    <?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.

  2. Not without editing the sidebar.php I don't think.

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

  4. leisegang
    Member
    Posted 3 years ago #

    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?

  5. 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 :)

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

    You can't.

Topic Closed

This topic has been closed to new replies.

About this Topic