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.

Need Help with Thesis custom_functions.php and WP Shortcodes

  1. Hi Everyone!

    I'm having trouble when calling my Gravity Forms shortcode from within a function on a page. I'm not sure why, but the formatting of the form seems to disappear this way.

    http://www.flyinstyle.biz/test-quote/

    The PHP code I'm using for this is:
    <?php echo do_shortcode('[gravityform id="1" name="Free Quotes for Business and First Class Flights" title="true" description="false" ajax="true"]');?>

    When copying the same code onto a new page, the however seems to style properly
    http://www.flyinstyle.biz/test-quote2/

    When adding the same code without the PHP call into a post, the form seems to render the columns.
    [gravityform id="1" name="Free Quotes for Business and First Class Flights" title="true" description="false" ajax="true"]

    -=-

    Also the last three fields in column three seem to have some extra spacing which pushes them to the right. Not sure why, but I'd like to have it removed as well.

    Any help would be appreciated! Thanks :-)

    Posted 7 years ago on Tuesday November 8, 2011 | Permalink
  2. You're going to need to enqueue the gravity forms scripts and styles when placing a form via a function call. See this:

    http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts

    Posted 7 years ago on Tuesday November 8, 2011 | Permalink
  3. Thank you Rob!

    I don't see a reference in header.php of Thesis Theme for wp_head() and it would get removed on upgrade as well.

    So I tried writing a function, but it doesn't seem to include the css file in the header. Is there something I'm missing.

    function gf_enqueue() {
    	gravity_form_enqueue_scripts(1, true);
    
    } add_action('wp_head' , 'gf_enqueue');

    As well, does anyone have an idea why the last three fields in my third column "gf_right_three" are skewed?

    http://www.flyinstyle.biz/test-quote2/

    Posted 7 years ago on Tuesday November 8, 2011 | Permalink
  4. This is causing your style issue on the column:

    [css]
    .custom #gform_wrapper_1 .gf_right_third {
        width: 145px;
    }

    Remove that (in custom.css) and it lines back up.

    Posted 7 years ago on Tuesday November 8, 2011 | Permalink

This topic has been resolved and has been closed to new replies.