Home Forums WoodMart support forum Adding custom code to theme

Adding custom code to theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #420976

    DGHT
    Participant

    Hello! I want to test a code, which loads contact form 7 + it’s recaptcha integration on custom pages only. The reason – loading recaptcha twice and your custom theme settings preset works only on js and css of the contact form 7, but not for recaptcha.

    Can you advise where to put the code, so I can test it. Thanx!

    // Load CF7 only on pages with forms
    function yourfunctionname_cf7() {
        if( ! is_page( array( 'contact', 'contact us' ) ) ) {
            add_filter( 'wpcf7_load_js', '__return_false' );
            add_filter( 'wpcf7_load_css', '__return_false' );
            remove_action( 'wp_enqueue_scripts', 'wpcf7_recaptcha_enqueue_scripts', 20, 0 );
        }
    }
    add_action( 'get_header', 'yourfunctionname_cf7' );
    #420995

    Artem Temos
    Keymaster

    Hello,

    You need to consult with the plugin developer for this question since it is not something related to the theme.

    Kind Regards

    #421013

    DGHT
    Participant

    I don’t see the child theme in the main archive package on Envato Downloads section (All files and docs)!

    #421016

    Artem Temos
    Keymaster

    Hello,

    Use the following link to download the child theme https://woodmart.xtemos.com/plugins/woodmart-child.zip

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)