This code filters all style url’s. It returns the url if there is no reference to google fonts. It returns ‘false’ if there is a reference. What you want is to change the condition. It should only return false if there is a reference and you are on a certain page. Logically, this is equivalent to returning the url if there is no reference or you are not on that page. Like this:
if ((strpos($href, "//fonts.googleapis.com/") === false) || !is_page(12345)) {
Where you should replace 12345 with the ID or slug of the page you want to exclude.
Related Posts:
- How to add a custom CSS class to core blocks in Gutenberg editor?
- Adding a class to the body_class function
- Add classname to the_category() function?
- Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies
- Where is this inline CSS code [closed]
- How to center oEmbedded content
- Remove CSS & JS files from WordPress Main Page For Increase Pagespeed?
- Header image automatically changes depending on season
- Change login CSS
- How would I be able to use a font awesome icon as a user’s avatar?
- Add an attribute to the root from functions.php with add_filter
- Publish button inside custom field group
- This code works, but breaks the media uploader. How do I integrate it in a way that won’t?
- Background color and background image below element in Contact Form 7 – error tip [closed]
- CSS Font Border?
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- Not able to change wp_title using add_filter
- How to hook a filter to catch get_post_meta when alternate a custom field output?
- Changing JPEG compression depending on image size
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- What do add_filters() and apply_filter() do?
- add_filter to youtube embeds?
- How can I detect if a user changes their password?
- SSL certificate for the host could not be verified
- Store source permalink on XMLRPC calls
- What to use instead of the content_save_pre filter?
- How to limit the pages displayed for choosing parent page on page attribute’s menu?
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- Can’t change a label in woocommerce with the normal filter
- WordPress RSS feed – filter RSS content by custom field value
- What is the filter hook for custom fields content?
- Filter keywords from search query
- Add class to woocommerce checkout body based on filter [closed]
- changing variable through filters or action hooks
- Filter the URL of next_posts_link & previous_posts_link
- How to replace any occurence of Gravatars with a local placeholder image?
- Add a header before fields added with the attachment_fields_to_edit() filter
- Are there Limitations on filter handles?
- Why my admin doesn’t work after adding rest_prepare_post filter?
- Buddypress: Edit activity when new blog post [closed]
- remove_action in plugin file
- How to apply filter at search of woocommerce products?
- Variables in post title
- Filtering post-formats from the loop using new WP-Query();
- How to edit dashboard search posts button texts for my CPT?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- How to add a filter to get_the_author_meta?
- When does a function assigned to the content_filtered_edit_pre filter hook fire?
- Capture post content before page renders
- Empty string supplied as input when parsing content
- Remove inline styles from the_content?
- How can I remove the kses filters when saving a specific post type ? (it breaks my JSON)
- Remove_action does not work
- What different ways can a plugin add a filter to a WordPress site?
- How to pass variables to custom filter from multiple functions
- WooCommerce Custom Product Validation [closed]
- Make WP not format code, not insert line breaks in between tags
- the_content filter together with require_once returns 1 instead of the content of the included file
- Missing Argument 2 for apply_filter
- How to get a single hook from wp_head()?
- Detect when gutenberg editor title is available in Dom after editor load
- How to apply a filter to an ACF wysiwig editor field output?
- Is it possible to bind a function to a filter hook via Ajax?
- Add a filter to an action [closed]
- Why template_include filter does not work with WPML plugin?
- Hide Posts In Back-end/Admin Based On User’s (Pseudo) Privileges Controlled by ACF
- Filter Pages by Custom Field (ACF) in admin area
- How to access theme fonts using custom CSS style? [closed]
- Remove tags without a specific meta key from “choose from the most used tags”
- Which Filter Do I Use To Modify The Subject Of The Retrieve Password Notification Email?
- Register users by e-mail
- Making an add_filter() call from within an add_filter() call
- automatic title through filter
- Finding actual functions added to hooks and filters
- Buddypress Filter Multiple Activities [closed]
- How to apply filter on get_the_post_thumbnail()
- How do I check if I can use the allowed_block_types filter?
- oembed_dataparse filter not running at all for standard YouTube embed
- Wrap WordPress Login Form in custom Div
- Action for opening attachment or manipulating all attachment links
- Filter wp_mail based on content type
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- mu-plugins body_class filter not working
- Conditionally (cpt) filter previous and next_post_link
- Post filter Month dropdown at front-end like wordpress backend
- shortcode function outputs multiple anchor tags
- changing size image within the content
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- Show child theme for users on specific IP
- wp.getPosts with status = ‘trash’ using node.js
- Is there a way to overwrite a filter used in canonical.php?
- How do I remove certain HTML elements with specific classes from the feed?
- Adding an orderby filter, casting postmeta with multiple keys
- confusion with add_filter
- post->post_content filter
- How to change this WP logo and posts url in block editor?
- Limit total tags in the_content