How can I remove css from a child theme?

Twentyten has a header.php file which has the style.css hardcoded into it: <link rel=”stylesheet” type=”text/css” media=”all” href=”https://wordpress.stackexchange.com/questions/40174/<?php bloginfo(“stylesheet_url’ ); ?>” /> There is no way to wp_dequeue_style because it is never “loaded” with wp_enqueue_style in the first place. To get that out of the header you’ll need to edit the twentyten theme (bad idea) or … Read more

Styleswitcher or themeswitcher to allow user to switch back to standard view from mobile device

Wouldn’t it be enough to switch mobile/desktop via a $_SESSION variable, make the “switch to desktop link” include something like ?switchtodesktop=1 and have the header contain something like session_start(); if ($_GET[‘switchtodesktop’]) { $_SESSION[‘switchtodesktop’] = true; } $desktop = isset($_SESSION[‘switchtodesktop’]); […] if ($desktop) { // only desktop css without media queries } else { // default … Read more

Why is WordPress changing my HTML code

Couple of things: You’re missing the semicolon after your unicode character, should be &#8221; The quote element gets stripped by the visual editor b/c the version of TinyMCE that WordPress implements is only set to recognize a certain subset of html elements and it strips out the rest. Possible solutions: Disable the visual editor in … Read more

Sub folder CSS that’s read by Admin panel

Answered by @Vino here: https://stackoverflow.com/questions/12066316/sub-folder-css-template-headers-that-are-read-by-admin-panel/12139043#comment16259096_12139043 “File wp-includes/class-wp-theme.php, line 191, WP 3.4.1 source. but… there are no filters, and the class is final. You can edit at your peril, ’cause updates to WP will overwrite your efforts.”

Add nav menu CSS class to body

This is what I managed to cobble together thanks to Mridul Aggarwal’s hints: function pa_assign_menu_class_to_body(){ // ‘main’ is the theme_location, set earlier using register_nav_menus() $menu_name=”main”; $class_list = array(); if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) { $menu = wp_get_nav_menu_object( $locations[ $menu_name ] ); $menu_items = wp_get_nav_menu_items($menu->term_id); // _wp_menu_item_classes_by_context() … Read more

Archive dropdown styling not applied

You’re targeting cd-dropdown with a class indicator (the period), the cd-dropdown is an ID and should therefore be targeted with the ID selector (a hashtag). #cd-dropdown > span, #cd-dropdown ul li:nth-last-child(-n+3) span { box-shadow: 0 1px 1px rgba(0,0,0,0.1); }