Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter bramvds

    (@bramvds)

    better like this:

    //* remove and replace parent theme actions
    function remove_actions_parent_theme() {
    remove_action('wp_head','flatsome_viewport_meta', 1);
    }
    add_action('init','remove_actions_parent_theme');
    //* Now re-add the customised action
    function child_viewport_meta_replacing_parent_theme() {
    echo apply_filters( 'child_viewport_meta_replacing_parent_theme', '<meta name="viewport" content="width=device-width, initial-scale=1" />' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    }
    add_action( 'wp_head', 'child_viewport_meta_replacing_parent_theme', 1 );
    Plugin Author Kybernetik Services

    (@kybernetikservices)

    @bramvds I have pusblished version 1.6 and added better compatibility for Flatsome theme so, just one meta viewport will be printed in the source code.

    Thread Starter bramvds

    (@bramvds)

    Thanks

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘flatsome’ is closed to new replies.