I created a child theme and it doesn’t work for some of the css files

You are calling your css files with wrong function like in following line of your code wp_enqueue_style( ‘parent-style’, get_directory_directory_uri() . ‘style.css’ ); You are using get_directory_directory_uri() function to call files which is not event a function in wordpress. Files must be called with one of the following two functions get_stylesheeet_directory_uri() : This function will search … Read more

How to dequeue / deregister parent theme style

It is pretty simple: function remove_nada_theme_font_style() { remove_action( ‘wp_enqueue_scripts’, ‘nada_theme_styles’ ); } add_action( ‘after_setup_theme’, ‘remove_nada_theme_font_style’ ); Since the child theme is loaded before the parent theme, you can’t simply remove the action. because the add_action calls in the parent theme will simply overwrite your requests. You have to wrap it into the after_setup_theme hook. This … Read more

Dequeue Scripts and Style for Mobile not working?

You should run the conditional tags (e.g. is_front_page()) from inside the callback/function (e.g. remove_default_stylesheet()) — see Where to Use Conditional Tags and the warning here. And there’s no hook named wp_enqueue_style; just use the wp_enqueue_scripts to enqueue/register/dequeue/deregister a stylesheet file. So I’m not sure the exact conditionals you need, but the following would dequeue/deregister the … Read more

Plugin throws up 404 on front-end when when enqueuing style with filetime

You’re getting the 404 error because you didn’t provide the correct URL address of your CSS file. And that’s because of the first plugin_dir_path() below which outputs a filesystem directory path (e.g. /home/user/var/www/wordpress/wp-content/plugins/my-plugin/): wp_enqueue_style( ‘myplugin-style’, plugin_dir_path( __FILE__ ) . ‘/css/style.css’, array(), filemtime( plugin_dir_path( __FILE__ ) . ‘/css/style.css’ ) ); So you should instead use plugin_dir_url() … Read more

“wp_enqueue_style();” don’t load new edited style

Another solution is to use filemtime for the cachebusting, so that the last modified timestamp is used as the querystring variable. This has the advantage that of still using the browser cache, and yet, a new file is served when the file is actually changed because the querystring changes. eg. $lastmodtime= filemtime(get_stylesheet_directory().’/style.css’); wp_enqueue_style(‘whatever’, get_stylesheet_uri(), array(), … Read more

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