Instead of trying to change the URL of the img tag, use your media query to hide the image and change the :before
of your <a>
. Like this…
@media screen and (max-width: 59.6875em) {
.site-branding img {
display:none;
}
.site-branding a::before {
content: url("https://www.example.com/example/wp-content/uploads/Logo_Wide_2x.png");
}
}
Related Posts:
- Is it possible to create a full width row in WordPress’s editor window? [closed]
- Can the Theme Customizer be used to generate static/cachable CSS, and how?
- Add fields in customization tab to change background colours of certain classes
- Shrink Header Image on Scroll
- Twenty Fifteen : Wider right column for the content
- CSS properties in textarea in the Customizer
- Removing Image Links from Custom Post Type
- Customizer Appearance Issue
- Customizer: CSS changes not persistent
- How to make CSS load live based on options clicked in the theme customizer?
- Menu is not styled properly and footer as well [closed]
- In which file can I find the custom CSS code I entered?
- Hiding site title for Twentyfifteen sidebar on (responsive) desktop display size
- Why is the “Additional CSS” section missing in my theme Customizer?
- adding additional css classes have no effect within block editor
- Customize Bootstrap checkboxes
- Is there a CSS parent selector?
- How can I center an absolutely positioned element in a div?
- css transition opacity fade background
- Text-decoration: none not working
- CSS transition shorthand with multiple properties?
- How to center HTML5 Videos?
- Using custom fonts using CSS?
- Why is my Bootstrap code not working?
- What is the difference between visibility:hidden and display:none?
- Center a position:fixed element
- How to change the background colour’s opacity in CSS
- difference between css height : 100% vs height : auto
- How to make canvas responsive
- Disable SSL / HTTPS for wordpress
- Forcing reload of editor-style.css
- How can I make the wordpress editor apply the selected template?
- How do I register/enqueue a custom CSS file?
- How do I remove specific styles from the parent theme css using the child theme css?
- How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?
- PageLines theme: how to change the background color of the main content vs. entire page?
- When using https, wordpress doesn’t use https for CSS and JS, and admin doesn’t work. How do I fix this?
- Woocommerce include custom stylesheet after woocommerce styling [closed]
- raw code vs wordpress
- Remove id attribute from stylesheet link
- Is there a way to change the backround color of the native video player in wordpress?
- How to create fa-bars animated menu
- Only column gallery on mobile device
- Does costum code in the root folder get lost when wordpress is updated?
- Changing CSS FilePath for All Pages
- CSS Minification
- wp_add_inline_style breaking style and not working
- show count is out of the anchor tag in wp_list_categories
- jQuery UI styles conflicting with TinyMCE dialog
- How to add a custom CSS class to ALL links
- Why won’t my custom login page CSS load?
- Display Something in the Header After All Styles are Loaded
- wordpress – site not update after update style.css
- NGINX+wordpress: CSS being served but not applied
- How to apply CSS based on publishing date
- Menu toggle bar works only on some pages in WordPress
- Including CSS files in HEAD based on page content
- Video header on mobile, disappears behind header and content
- Free theme and css/bootstrap.css is not overridden in the child theme
- How to style text in WordPress
- Use special fonts on a non-hosted WordPress blog
- WordPress hide the username/password fields in login page
- Equal height sections in custom Headway Theme
- Links on the page, when being printed, have the URL next to them
- How do I minify ‘@import’ css files with wp-minify?
- Selector for page to set up scrolling plugin
- Button doesn’t work in the profile panel
- Will WordPress updates remove Gutenberg Additional Classes?
- My css don’t get applied on the costume widget
- Stop custom Gutenberg styles taking over other admin bits?
- astra theme costum css not working in wordpress 5.6
- Change post featured image
- Is there a way to cache mailchimp css on wordpress?
- Trying to get my CSS files to load last using add_action(after_setup_theme, add_css_js, 100000)
- Trying to modify the background of a form on a specific page
- Removing a CSS rule from Custom Taxonomy
- How to get different html tags from the content using regex?
- Performance hit of Inline CSS
- Remove top bar header
- Hide duplicate entry title
- How to get homepage div container of wordpress website to display full width? [duplicate]
- CSS in child theme to replace !important in parent theme
- How would I add this code to a single WordPress page?
- WP theme update causes child theme CSS problems
- How to change menu hover color to white on my theme? [closed]
- adding a favicon to site2 – site1/site2/favicon.ico
- disable lightbox in a plugin [closed]
- Which files can be replaced in a child theme?
- How do i make a sidebar background color? [closed]
- How to remove audio player styles added by mediaelement.js JavaScript?
- Do you use css reset in your child theme [closed]
- CSS messes up when CACHE is cleared
- Twenty Fourteen Theme – Moving left sidebar to the right
- WordPress doesn’t respect “ver” parameter in styles [closed]
- why does WordPress custom css convert alpha to hex values?
- how to change the colour of this background
- Can I upload my HTML/CSS/Javascript game onto a WordPress page?
- How to add css to wp_head depending on the user role?
- can i custom rendered content from API?
- How to include Elementor CSS in custom php file [closed]