WordPress.org

Ready to get started?Download WordPress

Forums

sidebar_ends, sidebar_start hooks (2 posts)

  1. nagyv
    Member
    Posted 8 years ago #

    Hi!

    I am writing an ad-plugin, and would like to be able to show up the ads in several places. One of them is the end of the sidebar. But as I see there is no hook for it.

    Could you rewrite the get_sidebar function in wp-includes/template-functions-general.php as

    function get_sidebar() {
    do_action('sidebar_starts');
    if ( file_exists( TEMPLATEPATH . '/sidebar.php') )
    load_template( TEMPLATEPATH . '/sidebar.php');
    else
    load_template( ABSPATH . 'wp-content/themes/default/sidebar.php');
    do_action('sidebar_ends');
    }

    I think that this could be helpful for a lot of plugin devs!

  2. schulte
    Member
    Posted 8 years ago #

    With the introduction of Widgets, you will be able to manipulate the sidebar quite easily...

    http://codex.wordpress.org/Plugins/WordPress_Widgets#Resources

Topic Closed

This topic has been closed to new replies.

About this Topic