• I’m trying to remove the title bar/header in several sidebar widgets. Is there any code I can put in the title field to remove the title bar/header altogether? Also, is there a way to remove/control the dotted lines that separate sidebar widgets?

Viewing 15 replies - 1 through 15 (of 18 total)
  • open up the widget’s php file and look for this line
    $before_title . $title . $after_title for the relevant widget. edit it out or delete it. that will remove the code that opens the title, puts the title in and closes the title code. your other issue is probably css based, and will vary on your theme.

    Thread Starter jguttman

    (@jguttman)

    Thanks!! Both issues are sidebar widgets. Where can I edit its php file?

    what i mean is, the dotted lines have probably been added in using css, as they aren’t a default function. If you give us a link to your site if its live i could tell you better what to change.

    Thread Starter jguttman

    (@jguttman)

    ok, you have this in your css file, which is probably style.css:

    #content h2
    border-bottom:1px dotted #C0C0C0;
    border-top:1px dotted #C0C0C0;

    that is what is creating your dotted lines. if you delete both of those lines(not #content h2) then the dotted lines will go away wherever you use a h2 title.

    did you delete the lines that i said about before? I take it that it is for your google search box that you wanted to remove your title, as its the only one that is blank?
    For your google search box, on your plugins list, look for google search widget, and click on edit on the right. then remove . $before_title . $title . $after_title – you’ll find it about half way down.

    Thread Starter jguttman

    (@jguttman)

    thanks for the tip on the google search bar. the main issue is bottom left sidebar. i want to remove the title above the “click” graphic (just a filler image for now). i dont want to remove all titles/headers on the page. isn’t h2 used elewhere as well?

    ok, i missed that one. so this one by the click image is a standard text widget. so this time, go to your plugins list, then on sidebar widgets, click edit on the right. find this section `function widget_text($args, $number = 1) {
    extract($args);
    $options = get_option(‘widget_text’);
    $title = $options[$number][‘title’];
    if ( empty($title) )
    $title = ‘ ‘;
    $text = $options[$number][‘text’];
    ?>
    <?php echo $before_widget; ?>
    <?php $title ? print($before_title . $title . $after_title) : null; ?> <— here
    <div class=”textwidget”><?php echo $text; ?></div>
    <?php echo $after_widget; ?>and delete or comment out the php bit ive indicated - so the$title ? print` etc bit. The only problem with this is that for every text widget you have, you wont get a title. This is an issue that has been raised before, and it should be resolved in the next widget release. hope thats all clear? as for your h2s, add this to your css h2.widgettitle {
    color:#000000;
    font-family:Times New Roman,Verdana,Arial,Sans-Serif;
    font-size:14px;
    font-weight:bold;
    margin:0px;
    padding:5px 0px; } this should differentiate between a normal h2 and a widget h2, and it now doesnt have the dots.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    A better way than hacking the code would be to use some CSS to do it.

    Example: If you wanted to get rid of the “Recent Posts” title header thing, then this would do it:

    .widget_recent_entries .widgettitle {
    display: none;
    }

    Or say the just empty space above that big click button on the lower left side:

    #l_sidebarwidgeted .widget_text .widgettitle {
    display: none;
    }

    Just add to your theme’s stylesheet and go with it.

    Thread Starter jguttman

    (@jguttman)

    Shit – I’m getting a syntax error now (line 835). i can’t even undo, still showing syntax error. i may be in over my head. here is the paragraph. do you remind editing and posting for me.

    <?php echo $before_widget; ?>
    <?php $title ? print($before_title . $title . $after_title) : null; ?>
    <div class=”textwidget”><?php echo $text; ?></div>
    <?php echo $after_widget; ?>

    Thread Starter jguttman

    (@jguttman)

    dude – are you on IM – I’m in trouble here, sinking fast.

    Thread Starter jguttman

    (@jguttman)

    getting a syntax error and getting locked out of my site. help!! what do i do now?

    do you have ftp access to your site? you need to use that.

    Otto definitely had a good solution up there – no need to hack code – just edit your CSS file.

    Thread Starter jguttman

    (@jguttman)

    Otto – you rock!! Thanks dude.

    Thread Starter jguttman

    (@jguttman)

    Epicalex – I appreciate your time as well….though the css route was much easier.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Sidebar widgets – how do I remove title bar/header’ is closed to new replies.