is it possible to use post-type as part of a css selector in block editor stylesheet?

In the meanwhile I posted this question also on Stackoverflow. I got a hint in a comment to the question which led me to a solution. I didn’t find a pure CSS solution, but used the following jQuery script to add according classes dynamically: $(document).ready(function() { if($(‘body’).hasClass(‘post-type-page’)) { $(‘#editor’).addClass(‘post-type-page’); } else if($(‘body’).hasClass(‘post-type-post’)) { $(‘#editor’).addClass(‘post-type-post’); } … Read more

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

How to change header & footer to full width? [closed]

There are many ways to achieve this. First of all, right now all your content (including the header and footer) are inside a .container with a width of 960px. You cannot get these div’s to be 100% in width when they are inside this container. So what you need to is to change your code … Read more

Is it possible to change the path of a css file that is registered through wp_enqueue_style()?

I wonder if you are looking for the style_loader_src filter? For example: add_filter( ‘style_loader_src’, function ( $src ){ // … your stuff … return $src; } ); Similarly there exists the script_loader_src filter. There’s also the base_url property of the global $wp_scripts and $wp_styles objects, but I think that’s only used for enqueued native styles … Read more

How to get child style.css to load last rather than second behind parent style.css?

If the dependency array contains the IDs of all the other stylesheets, then yours should load last. Try adding the other stylesheets to the array when you enqueue your stylesheet: wp_enqueue_style ( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array ( $parent_style, ‘bootstrap’, ‘bootstrap-touchspin’ ) );

How to center a video [closed]

To center an element, you will also have to style it’s parent element too. So let’s say, you video has a structure like this: <div class=”parent-class”> <video class=”wp-video”> </video> </div> To center the video, you will have to give it’s parent a width. Using: .parent-class{ width:100%; display:block; } Now, you can use this to do … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)