I’ve managed to fix this by changing the operator on the ‘if’ statement:
Original:
?>
<style type="text/css">
<?php if( get_theme_mod( 'facebooklink_edit' ) == '' ) { ?>
#fb-footer-bg { display: none; }
<?php } // end if ?>
</style>
<?php
Updated:
?>
<style type="text/css">
<?php if( get_theme_mod( 'facebooklink_edit' ) ===
#fb-footer-bg { display: none; }
<?php } // end if ?>
</style>
<?php
Changing ‘is equal to’ to ‘is identical’ seems to fix this.
Related Posts:
- Theme Customizer – Dynamic CSS PHP File
- Why would the child theme load in the Customize preview, but not on the site itself?
- Cant get theme to change footer color through theme customizer
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- WordPress customizer: load controls in a custom div
- How to change “Shipping Calculator “field label on Cart Page – woocommerce? [closed]
- Customizer Show/Hide Logo and Site Title
- CSS saved & enqueued, but wordpress doesn’t load css text, only file
- Using PHP in a Stylesheet (possibly a “.htaccess” problem?)
- WordPress doesn’t include css
- Understanding child theme functions.php
- Is it possible to use the featured image of a page as a css background without inlining?
- How to display a value from a radio button in the options menu in wordpress
- How should I best target dynamically served content?
- Style every second widget?
- How to scale image with equal width and height without distortion?
- php syntax – how to concatenate properly – echo bloginfo(‘stylesheet_directory)
- wp nav menu: add attributes to menu items [duplicate]
- Problem adding class to body_class
- Getting array of customizer settings
- Plugin CSS not enqueing
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- How to design a table based on css values set from admin/dashboard
- Best way to schedule daily change in CSS parameter
- Gravity form built in Captcha
- How does wp_enqueue_scripts work?
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
- responsive.css in the WordPress should be prioritized
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- height should be set to auto to avoid pixelation in the post thumbnail function
- Correct way to enqueue page specific CSS file
- Wrapping a Sidebar within
- Add Codepen animation as Preloader to WordPress
- Reduce size of responsive title
- Clickable image link sends people to wrong URL
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- Creating a mobile site by adding a new class to the body tag from functions.php
- Get ACF options field in PHP acting as CSS
- Customizer: How to change Header Image description
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- Link to page with posts of specific type
- Conditionally load class in the comment section of the post page
- Assign Custom classes to every Excerpt
- Adding a navigation page state to individual blog and portfolio pages
- Using theme options to change a border-radius value
- Inline CSS header style priority function.php Child (no enqueing I think)
- Displaying images outside the content
- How to put search bar & logo in the “primary navigation” storefront theme?
- OOP PHP class extends TwentyTwenty_Customize in Child Theme
- Applying css in functions.php
- How to add a CSS class to this php code [closed]
- PHP function for horizontal Woocommerce thumbnails and badges
- Use CSS tag inside PHP code
- My top header looks different on single pages but is fine on the home page
- Using php code inside style tag
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- Warning: Use of undefined constant all – assumed ‘all’ (this will throw an Error in a future version of PHP) in C:\Users\…….. on line 6
- Drop down question
- How to print all the inline styles in the WP_Styles instance together with their keys?
- The style.php file inside theme-engine folder has other content on FTP
- how to add functions to my function.php using a child theme?
- Replace header with large image on home page only, using Genesis child theme
- Site title not showing. Please help me
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Remove specific javascript when viewing page in Customizer?
- Hot to edit WooCOmmerce dashboard?
- Using Sprit-sheet on WordPress categories
- Add class for the_post_thumbnail_caption()
- Target a specific container to style on WordPress storefront theme
- How to include different html tags in the header for different pages?
- Use Custiomizer to setup meta theme color tag
- Default Image not showing up in Customizer for WP_Customize_Cropped_Image_Control
- Font-Family does not looks like how it should be [closed]
- Custom Theme, Editor won’t wrap text (i.e. change width)
- customizer live preview layout picker
- Click to expand menu
- How to add style in functions.php depending on conditions?
- How to remove image on single product and get product to span page?
- Modify arguments for parent theme’s `wp_register_style` via child theme
- Replace content in WordPress Page after GET from php page
- Hide button based on PHP result
- How to have Function of a plugin using global vars into a shortcode?
- Child theme not working properly
- WordPress – Image href for home menu nav not working
- WP_Nav Highlight Parent Issue
- How can I clear the theme mod settings?
- Changing 2011 theme header image based on user dropdown
- How to change a specific character in a theme option value – replace a space with a plus sign
- Echo piece of code from file
- How do I get Roboto Google Font to display normal font-style? [closed]
- Using PHP for background-image property [closed]
- which php or css file has generated an inline style in WordPress that overwrites my css
- New to wordpress. Need Help with templates [closed]
- Child-theme suddenly stopped working [closed]
- Parse error: syntax error, unexpected ‘}’ in
- WooCommerce Checkout Cart [closed]
- How to create different templates for woocommerce single-product.php?