Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Every time I use the_post(); in my theme code, the following is echo'ed into my pages:

<style type="text/css">
    <!--
    .formTitle {
        font-size:20px;
        font-weight:bold;
        margin-bottom:10px;
    }
    .formDescription {
        font-size:16px;
        margin-bottom:15px;
    }
    .formElement {
        margin-bottom:15px;
    }
    .formElement .textbox {
        font-size: 16px;
        width:97%;
        font-weight: bold;
        padding:2px;
    }
    .formElement .title {
        font-weight:bold;
    }
    .checkbox, .radio {
        font-weight:normal;
    }
    .button {
        margin-top:10px;
        font-size: 14px;
    }
    .required {
        color:red;
    }
    -->
    </style>

Where in the world is this from? What is it? How do I stop it from being printed out?

share|improve this question
    
Do you have any form plugins that may be causing that? Can you share a sample of how you're using it in the template? –  Jonathan Wold Feb 27 '12 at 4:32
add comment

1 Answer

up vote 1 down vote accepted

You can view the actions and filters being used in your plugins and themes. I'm assuming something is hooked into the_post action somewhere. Dumping the following globals give you a peek behind the curtain here.

global $wp_actions, $wp_filters;

Once you identify the source, you either queue up the CSS properly in the HEAD, or remove it altogether.

remove_action('the_post', 'function_name');
share|improve this answer
    
Thanks that helped a lot. I was able to identify a poorly-written plugin that was spitting out that stuff when the_post() was called. Plugin should have been hooking the_header() or the_footer() instead. –  Jakobud Feb 27 '12 at 6:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.