PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

CSS output on footer

  1. Hi
    I'm doing something wrong and I can't find out where

    gravity form css file is printed on my footer, which I don't want because then I can hardly rewrite it with my style.css

    where do I have screw up thing (probably in function.php) but can't find out

    what is the function to force the gravity form to be printed on the footer? so that I can remoive it

    thank you for your help

    Posted 12 years ago on Saturday February 4, 2012 | Permalink
  2. Hard to tell without looking but it sounds like this would be a theme related preference. Does your theme use wp_head() and wp_footer()?

    Posted 12 years ago on Saturday February 4, 2012 | Permalink
  3. kyle
    Member

    You should be able to write more specific CSS which will overwrite the gravity forms CSS. So instead of

    .gform_body { /*styles */ }

    You can be more specific:

    body .content .gform_body { /*styles here take precedence */ }

    Posted 12 years ago on Saturday February 4, 2012 | Permalink
  4. thank you for your answers

    @Rob
    yes I use wp_head() and wp_footer()
    it is a very basic template that I have hand coded
    what I'm surprised is that I have used a basis of another theme I coded, where I used GF with no problem.. I was wondering if it could not be from GF plugin preferences on the admin side

    @Kyle
    yes I could write a more specific CSS, that would sort my current problem but that would not defeat the fact that I wish to have the gravity form CSS file to be printed thru the wp-head() rather than the wp_footer()

    thank you again

    Posted 12 years ago on Sunday February 5, 2012 | Permalink
  5. Greg, yeah usually our stuff gets output in the head, so I'm not 100% sure how or why in this instance yours is getting output in the footer. Can you compare with one of your other sites to find a common difference?

    Posted 12 years ago on Sunday February 5, 2012 | Permalink
  6. Hi Rob

    Thank you for the reply

    I have set up a blank theme

    functions.php -> none

    header.php & footer.php
    to it's simple

    I have added to the header
    gravity_form_enqueue_scripts(1, true);

    I use GF function call like that in my front-page.php

    gravity_form(1, false, false, false, '', true, 12);

    I still have the CSS output at the bottom

    here is a link
    http://test.ingenieurscreatifs.com/

    the strange part is that if I remove gravity_form_enqueue_scripts(1, true);
    I still have the css output at the bottom

    any idea?

    cheers

    Posted 12 years ago on Monday February 6, 2012 | Permalink
  7. sorry not to get earlier

    I have managed to make it work on a blank theme
    but now I want to integrate it onto my test theme

    I manage to have the css output in the header part if I add gravity_form_enqueue_scripts(2, true); to header.php just above the wp_header() function

    but if I want to call it from the functions.php with a function like this one

    add_action( 'after_setup_theme', 'icTemp_theme_setup' );
    function icTemp_theme_setup()
    {
    add_action('wp_head', 'gr_add_headers');
    }
    
    function gr_add_headers()
    {
    // je rajoute les fonts google dont j'ai besoin
    echo '<link href="http://fonts.googleapis.com/css?family=Open+Sans:200,400,700 " rel="stylesheet" type="text/css" />'.chr(13);
    // je rajoute les scripts necessaire pour gravity forms
    gravity_form_enqueue_scripts(2, true);
    }

    it is outputed on the footer while the google font reference is well outputed on the header part.

    any idea why there is that behavior?

    thank you in advance cause I'm a bit lost there

    Posted 12 years ago on Sunday February 12, 2012 | Permalink
  8. no one has idea?

    Posted 12 years ago on Wednesday February 15, 2012 | Permalink