Suggest you move your desired functionality to javascript; you are so badly attempting to overload the purpose of these constructs…even if you get it to work you are going to have a very fragile and difficult to maintain system on your hands.
Note that the idea of inlining style may work — but future Content Security Policy may kill that idea…inline CSS is a weak spot; see this OWASP explanation for more information.
Related Posts:
- How to target with css, admin elements according to user role level?
- Best way of adding CSS which can be manipulated by the user via theme option panels?
- Need help on WordPress and php
- Multiple pages on one with different HTML
- How to redirect all 404 in a WordPress subdirectory to the index.php of subdirectory?
- WordPress Customizer not setting default value upon initial install?
- How to override .htaccess with new rules without ftp or edit it manual
- if file_exists not working with wp_enqueue_style
- Using PHP to toggle stylesheet and header image, set in cookie
- Archive dropdown styling not applied
- Different background-image by category
- Add a Different CSS Class Into The Body Tag of Different WP Pages
- Show post in slider
- How can I hide Home in my menu in a specific page?
- Cannot get media type from ‘x-mapp-php5’
- Slider loading issue
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- how to remove metadata from the posts of my blog?
- How to style options page in dashboard?
- Theme Options Page – User Updates Logo
- How to change home or site url using action hooks or filter?
- How to add condition in wordpress loop? [closed]
- Customize position of social icons in upme plugin [closed]
- Css loads very slow [closed]
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- WP & Server Speed [Teacher Question]
- Redirect to another page using contact form 7? [closed]
- Which is the correct way to conditionally enqueue a CSS file?
- Custom Background by Page IDs
- WordPress add_rewrite_rules for custom URLs ending in .html
- Use PHP in stylesheet to specify a background image based on Category ID
- Change CSS based on is_user_logged_in
- WordPress wp_add_inline_style unable to give hex colors?
- How to create table in wordpress without plugin? [closed]
- wordpress admin plugin menu custom css
- Change “No Comments” link to “My String” on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]
- Where can I find the inline-css of my theme header?
- How to disable all logins except Network login in WordPress Multi site?
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- How to modify mobile nav menu text in theme
- Website completely messes up when logging out
- Dividing the loop to style post differently
- How to add new CSS file to new PHP file
- Applying CSS on PHP variable [closed]
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- Simple seo-friendly custom $_GET url rewrite with htaccess
- wp nav menu: show submenu below li item
- Styling an “active” link outside of WordPress default menu
- I get “Cannot modify header information – headers already sent” when I change my theme
- How to edit background color of only one sidebar?
- How to sort posts by active category in WordPress?
- How to find which .mo file is responsible for displaying a particular localized string?
- Add css class to string
- Removing links from Grouped products
- Add other class content with reference class value
- WordPress custom php script to match standard page layout
- admin panel – How to remove “delete” button from category editing page
- How do I integrate vanilla Javascript to a wordpress website?
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- Rewrite rule not working, but only when parameter is text
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- Hide author from search results meta, still display date and categories
- How to display post meta bellow every posts
- How to locate parent theme functions and add functions to my wordpress child theme?
- Add my footer menu to the header
- Make a full-width wordpress page
- Bring Font Awesome icons inside menu A tags
- Trying to add get_the_title hook to this line
- How to block access to a folder inside of wp-content for non logged in users?
- How to display post_content from database in different on template page?
- Displaying POST content with HTML tags and all
- remove blank space where sidebar was
- Display specific main Sub Nav on Woocommerce product pages
- Clone the “proceed to cart” button and place it above checkout on the cart page, but only appear display size is 320px
- Upload images from one server to an other in wordpress
- Problem with ajax request and directory structure after site migration
- Highlight Single Page Ancestor
- Relative post date in recent posts list
- Widget edit and add in any page
- Styling admin page rows in order of importance (checkboxes)
- Why isn’t my link attribute getting my css?
- How to save the output of php variables used in inline css code to the main style.css?
- featured post as div background
- Combining fancybox with multiple thumbnail plugin
- Trying to customize wordpress drop down categories
- Show Nav Link To Users Signed In
- How do I use CSS or PHP to customize WordPress Form Manager Plugin Table?
- PHP Puzzle: Unique Styles with PHP loop
- How to NOT override inline css rules
- How to use plugins_url() inside PHP stylesheet file [duplicate]
- Load files content [closed]
- Integrating CSS Into a WP Function Call [closed]
- WP_Query not returning results
- Predefine Magazine Style Layouts
- It’s not showing full content for posts pages in wordpress “[…]” while customing some changes in the style.css file [closed]
- How do I link the side images?
- How to create a container in php then customise it in CSS
- How to create different templates for woocommerce single-product.php?