• Hi,

    I’ve looked everywhere for what could be causing this, even disabled plugins 1 by 1 but can’t seem to find the trick. It’s this which appears in my head:

    <style type="text/css">.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}</style>

    It’s just i’m trying to reduce my head bloat, and can’t find what plugin or whatever is causing this to be implemented into my head.
    I’ve seen it on quite a few WP sites actually so I thought one of you guys might know where it stems from.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Most probably embedded by theme author.

    I hear things in my head too sometimes… ??

    It -may- be hard coded into the header.php template, but that would be odd. If it is, then it was a quick way to do a last minute addition to the CSS. If you remove it, you may need to add the CSS part (only) to the style.php template: .recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}

    Thread Starter xdesi

    (@xdesi)

    You might want to get that checked out Wendel : )

    I created my own theme, based on the default theme anyway so it’s not rolling around in these files AFAIK.

    Wendel that’s exactly what I want to do is to shove it inside my CSS file, but I just need to find out how to remove it from my head.

    I’m going to disable ALL my plugins and see if it shifts then re-enable 1 by 1 and see who the culprit is ??

    I guess if you have a plugin that manages or interacts with ‘recent comments’ that would be a likely culprit.

    I know Sphere adds its own CSS to the head to position the Sphere icon. If you have any social bookmarking buttons, they might be doing it, but that would seem odd.

    WordPress itself adds that via the wp_head() hook, in header.php, for the “Recent Comments” plugin. If you want to change the style, add the css rules after <?php wp_head(); ?> but before </head>, in header.php

    Help!

    I can’t get rid of the “.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}” line of code in my blog here: https://seejanesoar.theadventurouswriter.com/

    I understand it was caused by adding the Recent Comments widget, which I’ve now deleted. But I need to get rid of this code on my blog.

    Can anyone help me?

    Thanks,
    Laurie

    If you don’t want this to appear, you can remove this from your /wp-includes/default-widgets.php file:

    function recent_comments_style() { ?>
    	<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
    <?php
    	}

    If you do that though, keep in mind, each time you upgrade WordPress to more current versions, you’ll need to remember to manually update this file (assuming it doesn’t become obsoleted).

    Also, if you do this, you will need to add the css code back into your current themes stylesheet:

    .recentcomments a{ display:inline !important;padding:0 !important;margin:0 !important;}

    And lastly, if you ever decide to change your theme, you’ll need to remember to add that same line of CSS into your new theme stylesheet.

    I am sure that there is an easier way to cancel out in the functions.php file of your theme, but I don’t know PHP enough to figure it out. In the mean time, you can consider this a solution – as much of a pain in the butt as it may be – at least until we can get a more experienced programmer to provide something better. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Where’s this in my head coming from?’ is closed to new replies.