Support » Fixing WordPress » Removing ‘page-bottom’ widgets using a function

  • Hi Guys,
    I’m trying to use a function to remove the page-bottom widgets from a page.
    I know there are other ways of doing this using css or removing the call get_sidebar(‘page-bottom’). But I guess this is mainly an exercise to get more of an understanding of WP.

    I currently have this function, which is identical to another I have used to remove ‘thematic_sidebar’. I just can’t seem to target the ‘page-bottom’ widgets.

    function remove_page_bottom() {
    if (is_page()) {
    return FALSE;
    } else {
    return TRUE;
    add_filter(‘page-bottom’, ‘remove_page_bottom’);

    I’ve also tried using ‘widget_area_page_bottom’ but nothing so far has worked.

    If anyone could advise, it would be greatly appreciated.


  • The topic ‘Removing ‘page-bottom’ widgets using a function’ is closed to new replies.