• I’m trying to do some troubleshooting for someone’s site and I want to see where a particular link was enqueued. Specifically this is for Google fonts. The site uses the Phlox theme, Elementor and they have a child theme. I checked the child theme’s functions.php and I’m not sure where else it would be.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @lgehrig4,

    Insert the following code into the function.php file to specify the location of the link:

    function wp_dequeue_style( $handle ) {
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
     
        wp_styles()->dequeue( $handle );
    }

    Let me know if my answer helps you resolve your isse.

    Thread Starter lgehrig4

    (@lgehrig4)

    @lucaslitextension

    I pasted this in the child theme’s function.php file and when I tried to save it I got this error:

    Your PHP code changes were rolled back due to an error on line 55 of file wp-content/themes/phlox-child/functions.php. Please fix and try saving again.

    Cannot redeclare wp_dequeue_style() (previously declared in wp-includes/functions.wp-styles.php:195)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need Help Locating Where Link Is Enqueued’ is closed to new replies.