Changing widget title from link to plain text

  • Author
    Posts
  • #856632

    cuplet
    Member

    I am currently working on a private test site as I want to change the whole look of my blog (cup-let.com), but without affecting it whilst I try out new themes. I have a Twitter widget in my sidebar, the title for which automatically sets as a link. However, I would like the twitter widget title to show as plain text rather than a link, like the other widget titles I have in my sidebar.

    I’ve looked at the source code for the twitter widget title, and here it is:

    </div><!– #content –>
    </div><!– #primary –>

    <div id=”secondary” class=”widget-area” role=”complementary”>
    <aside id=”twitter-2″ class=”widget widget_twitter”><h1 class=”widget-title”>@cup_let on Twitter</h1><ul class=’tweets’>

    I can see the href entry which is making it a link. However, I want it to be plain text, as per the other headers in the sidebar (see example source code below):

    </aside><aside id=”text-2″ class=”widget widget_text”><h1 class=”widget-title”>Follow me</h1>

    How can I change the twitter widget title to show as plain text instead of a link, as my other widget titles do? I imagine I need to remove the href portion of the twitter widget title code, but not sure how to correctly go about doing this.

    Any help would be greatly appreciated!

    The blog I need help with is cup-let.com.

    #856824

    timethief
    Member
    #856825

    cuplet
    Member

    yes I have the custom design upgrade and it is a CSS editing question. My apologies for not specifying that.

    #856826

    timethief
    Member

    I’ll flag this thread for moving to the CSS Forum for you. Please be sure to specify which theme you are editing and provide an active link to the blog in question for those who will help you there.

    #856977

    I would like the twitter widget title to show as plain text rather than a link, like the other widget titles I have in my sidebar.

    I’m sorry but you can’t change functions like you have described with CSS. The WordPress.com Custom Design upgrade allows you to modify the look of existing elements like links, but you cannot add them or take them away with CSS only.

    For example, you could make it so the Twitter widget title isn’t underline when you hover over it:

    #container #sidebar .widget_twitter a:hover {
    text-decoration: none !important;
    }
    #856978

    justpi
    Member

    You can’t disable links but you can easily remove the title altogether, and add it in a text widget above the twitter widget.

    #856979

    Good idea! Thanks @justpi :)

    #856980

    justpi
    Member

    You’re welcome!

    #856981

    Here’s how to hide the Twitter widget heading with CSS:

    .widget_twitter h3 {
    display: none;
    }
    #856982

    cuplet
    Member

    Brilliant! Worked both those suggestions in and now my twitter heading is looking how I want it to. Thanks to you and @justpi for your help :D

    #856999

    Cheers :)

The topic ‘Changing widget title from link to plain text’ is closed to new replies.