Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Remove "Page" title from Page Widget (http://forum.bytesforall.com/showthread.php?t=2751)

georgenoise Jul 31, 2009 12:17 PM

Remove "Page" title from Page Widget
 
Figured I would post this for those who need it as I spent the past 30 minutes or so digging around. If you want to remove the title, since leaving it blank just results in the word "Page", on the Page Widget put the following in your html/css inserts:

Code:

div.widget-title h3,
td#left h3.tw-widgettitle,
td#right h3.tw-widgettitle,
td#left ul.tw-nav-list,
td#right ul.tw-nav-list {
        display:none;
        padding:0;
        margin:0;
        }

The disadvantage to this is that it removes the title for any widget you put on the left side. I'm sure with some more time I could figure out how to make it only for the page widget but it suits my needs for now. If anyone would like to expand on this please do as I am sure I will need it in the future. Enjoy.

juggledad Aug 1, 2009 04:59 AM

So why not just put a blank character in the title instead? Then the title is ' ' instead of null and the ' ' is displayed, but you can't see it so there is nothing in the title.

georgenoise Aug 3, 2009 01:48 PM

Your such a smarty pants. I never even thought to try that, but as usual it works.

tommyguns Oct 17, 2009 06:01 PM

This sucks, the point is, which smarty pants is missing, is that leaving the title with nothing in it still outputs a header tag in your source. Display none does the same. So both are shortcuts resulting in the same thing, ugly code which may or may not be punished by the SE's.

The solution is to not output anything for the title. I just dont know how to achieve it.

Boston-Coder Mar 20, 2011 08:55 PM

Hi,

Check out default_widgets.php. It is located in the wp-includes folder. If not there try widgets.php.
To remove the title find: (should be near the top, unless your theme modified the file)

$title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base);

The best way to remove it is just to add /* before it and */
Just copy and paste this, to make it real easy.

/* $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base); */


All times are GMT -6. The time now is 12:49 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.