WordPress loads old style.css, then loads current one

Styles are loaded in the order specified in the underlying code. It’s usually under control of the theme. If a 2nd style file has the same style defined, then the 2nd one overwrites the ‘parameters’ of the 1st style. This is as designed. Note that it is not a good idea to edit a theme’s … Read more

How to display posts with images in fullscreen slider

You can use this code bellow with Query: <div class=”w3-content w3-display-container”> <?php $slider = new WP_Query(array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 5, ‘post_status’ => ‘publish’, )); if($slider->have_posts()) : while($slider->have_posts()) : $slider->the_post(); ?> <div class=”w3-display-container mySlides”> <a href=””> <?php the_post_thumbnail(‘large’); ?> <div class=”w3-display-bottomleft w3-large w3-container w3-padding-16 w3-black”> Trolltunga, Norway </div> </a> </div> <?php endwhile; endif; ?> … Read more

CSS ?ver=4.7.3 not found

If your file working without query string then you can remove the query string by adding the following into functions.php // Remove WP Version From Styles add_filter( ‘style_loader_src’, ‘sdt_remove_ver_css_js’, 9999 ); add_filter( ‘script_loader_src’, ‘sdt_remove_ver_css_js’, 9999 ); // Function to remove version numbers function sdt_remove_ver_css_js( $src ) { if ( strpos( $src, ‘ver=” ) ) $src … Read more

How do I make a child theme’s style.css load after plugin css?

Well, currently two different ways are coming to my head- One way could be, using ultimate-style-min-css as a dependency of your child theme style.css– /** * Say this below function is your theme enqueue */ function the_dramatist_child_theme_scripts(){ wp_enqueue_style (‘your-child-theme-css’,’YOUR CSS URL HERE’, array( ‘ultimate-style-min-css’ ), null, ‘all’); } add_action(‘wp_enqueue_scripts’,’the_dramatist_child_theme_scripts’); Another would be using wp_dequeue_style first … Read more

Correct way of Enqueue self hosted fonts in sass project

I think the better way would be declaring a file named _fontface.scss and put the below code blocks there – @mixin fontFace($family,$src,$style: normal,$weight: normal) { @font-face { font-family: $family; src: url(‘#{$src}.eot’); // IE9 compat src: url(‘#{$src}.eot?#iefix’) format(’embedded-opentype’), // IE8 and below url(‘#{$src}.woff’) format(‘woff’), // standards url(‘#{$src}.ttf’) format(‘truetype’), // Safari, Android, iOS url(‘#{$src}.svg##{$family}’) format(‘svg’); // legacy … Read more

Admin area is not loading properly

You may have a bad plugin causing the ‘white screen of death’ when you try to get into the admin area. Check the error.log file in the wp-admin folder. That should give you an idea of where the problem is. You could also manually disable a recently-installed plugin by renaming that plugin’s main folder in … Read more

Get Sub-Menu Dropdown to Show Over Page Content

There is an overflow issue with your menu items. To solve it, head over to Appearance > Customize and add this piece of CSS to your custom CSS: .fusion-main-menu{ overflow:visible!important } This will allow your submenu to overlap the DIV while hovered.

Align divs in a basic WordPress site

Slowed down the pace of edits and thought it through … working now! The padding-top compensates for a tendency of the button to sit too high. .alignleft-luke5 { width:70%; height:200px; float: left; } .alignright-luke5 { width:30%; height:200px; float: left; padding-top:0.8em; }

Add class when more page is visited

It seems you are looking for body_class() You can read more here A solution for adding a body class to a specific page template: add_filter( ‘body_class’, ‘custom_class’ ); function custom_class( $classes ) { if ( is_page_template( ‘page-example.php’ ) ) { $classes[] = ‘example’; } return $classes; } The result on the front-end: <body class=”page page-id-7 … Read more