Archived topic
Gravity Form php
4 replies · Started by Farokh on January 21, 2018
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
Not sure why their docs would suggest you place it there.
Instead, use one of these methods: https://docs.generatepress.com/article/adding-php/
From what I can see, that should work. Have you reached out to GF support?