[Support request] Gravity Form php

Home Forums Support [Support request] Gravity Form php

Home Forums Support Gravity Form php

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #476262
    Farokh

    Hi Tom,
    I got this code from gravity docs (to manually convert GF to RTL while my WP languadge is English), which should be palced “in the header.php file of your active theme just before the wp_head() function call”.

    I use a child theme, so I added it to my child theme’s php file. But it does not work.
    Where should I place it? Can you help, please?

    add_action( 'gform_enqueue_scripts', 'enqueue_custom_script' );
    function enqueue_custom_script() {
        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';
        wp_enqueue_style( 'gforms_rtl_css', GFCommon::get_base_url() . "/css/rtl{$min}.css", null, GFCommon::$version );
    }

    THANK YOU

    #476462
    Tom
    Lead Developer
    Lead Developer

    Not sure why their docs would suggest you place it there.

    Instead, use one of these methods: https://docs.generatepress.com/article/adding-php/

    #476470
    Farokh

    I have already tried adding it to my child theme’s functions.php file, but it didn’t work.

    This is the link to the doc. Can you pleas take a look? Maybe I misunderstood something.

    3. Manually include RTL stylesheet

    THANK YOU>

    #476471
    Farokh
    #476751
    Tom
    Lead Developer
    Lead Developer

    From what I can see, that should work. Have you reached out to GF support?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.