Seems there are a few elements missing
First is the quotes in is_tax(country)
, should be is_tax(‘country’)
Second you are missing closing and opening PHP tags
When working with action that require html output you can do it in a few ways.
For now we will stick with the method you wanted to use.
The final result would look like this
add_action( 'wp_head', function () {
if ( is_tax('country') ) {
?>
<style>
@media (max-width: 768px) {
.site-content {
display: flex;
flex-direction: column-reverse;
}
}
</style>
<?php
}
} );
Related Posts:
- What controls responsiveness in WordPress?
- Why does my caroussel gallery do this in responsive? [CSS] [closed]
- @media in bluehost is being commented out [closed]
- Responsive Images Warping
- Old Site displays on Mobile View, not New Site
- No responsive design is displayed
- Title has word broken when viewed in mobile [closed]
- Move Sidebar from Above Content To Below When Responsive [closed]
- Why is this jquery / java script code not working in mobile / in devices?
- Faster fonts on mobile
- Change Header Image on Blog Post for Mobile View
- Menu toggle bar works only on some pages in WordPress
- Need to make sidebar responsive only when screen width is greater than 1024px
- New Styles Not Rendering On Mobile Phone and Tablet
- @media applying globally and not separately for each screen width [closed]
- My contact form is not being responsive
- Site not 100% responsive
- Header formatting works for safari but not chrome @media screen size technique on iphone
- Bootsrtap.css overlap style.css in custom wordpress theme
- Twenty Fourteen responsive CSS
- How would I use a media query to make my entire theme responsive or fluid? [closed]
- Responsive table on ios safari
- How to make this splash page responsive
- Hiding site title for Twentyfifteen sidebar on (responsive) desktop display size
- Vertically align text within a div
- Insert image after each list item
- How to add a color overlay to a background image?
- Change color of PNG image via CSS?
- In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
- How to completely remove borders from HTML table
- How to fix a footer overlapping content?
- What is element.style and why is it overriding my css settings?
- Overflow Scroll css is not working in the div
- CSS Div width percentage and padding without breaking layout
- How to place Text and an Image next to each other in HTML?
- What does the “~” (tilde/squiggle/twiddle) CSS selector mean?
- CSS background-image – What is the correct usage?
- Set bootstrap modal body height by percentage
- How can I fill a div with an image while keeping it proportional?
- Inbuilt style for jquery-ui-datepicker
- Why is style.css not being enqueued?
- Remove top admin bar
- How to add a class to ul tags created by the WordPress editor Tinymce?
- Using theme options to change link colours
- Disable child theme css on certain pages
- How to load a css file in one page only?
- How to add custom fonts in WordPress site
- Handling URLs in WordPress application
- Override load-styles.php with admin screen css
- CSS file not registering through add_action
- Custom Admin CSS styles to style media uploader?
- getting url in wp_enqueue_style
- Eliminate render-blocking JavaScript and CSS in above-the-fold content
- Unable to load CSS file (HTTP 403)
- Dynamic sidebar nav with current page highlighting
- how to setup content on a static frontpage with css and xhtml
- wp_enqueue_style – CSS Not loading – ERR_TOO_MANY_REDIRECTS [closed]
- How to integrate my HTML and javascript into my child theme
- Twenty fifteen theme – change responsive menu condition
- Custom styles dropdown in TinyMCE editor – not working with headings
- Load CSS in footer, like your can with JS?
- Understanding how the class family `inner-container` works
- How to deal with logo color on dark mode?
- HTML email sent with wp_mail shows plain text
- Add second background-image on hover
- Using css class selectors on a specifc page [closed]
- Common page width? [closed]
- WordPress Rest Api access the header and extract stylesheets URL
- Login validation on wordpress
- How to create CSS Counters for Comments (depth 5)?
- Navbar bg to overflow to section below (updated)
- Add top parent page id to body class
- How can customized CSS on WordPress highlight the blog title in white when it’s not intended?
- Are there any CSS classes for the wordpress colours?
- Set different css stylesheet for specific pages [duplicate]
- Desktop is class List and Mobile is class Grid
- Include ElementorPro css into WordPress custom page
- Customizing the CSS for the post/page editor?
- My Child Theme CSS Isn’t Working
- current menu item hover not working?
- how to load basic wordpress css
- Fonts are not applying
- Text Not Wrapping Around Right Floated Image [closed]
- header background color changed after drop & import database in phpmyadmin
- Add class when more page is visited
- How do I make a child theme’s style.css load after plugin css?
- Css style removed but still showing via CDN even after clearing browser cache and purging all caches for site
- How to include backend buttons css on frontend?
- Managing large CSS files [closed]
- Clear white line off page [closed]
- Strange symbols on page [closed]
- css .active dropdown selects all links
- background changed after WordPress update
- Menu is not styled properly and footer as well [closed]
- Footer in middle of page in different browers [closed]
- Why is the image in div not displayed in full-size?
- How do I add JS and CSS to WP (Flatsome)
- WordPress site suddenly not showing some DOM elements but mobile is fine
- Editing size of h3 tag in wordpress on a one-off basis
- Content doesn’t fit on large size desktops like 2560×1440