How to stop my themes CSS changing the WordPress interface/?

This can happen if the function for enqueueing stylesheets, wp_enqueue_style() is run inside functions.php outside of a hooked function, like this: <?php wp_enqueue_style( ‘my-style’, get_stylesheet_uri() ); functions.php is loaded on the front-end and back-end when your theme is active, so this will load the stylesheet in both places. To only load a stylesheet on the … Read more

Correct Way To Make Changes To A WordPress Theme

If you’re not the author of the parent theme, then it is better to create a child theme which overwrites the changes in the parent theme. With a child theme, you can do more than just additional CSS, you can modify template layouts and add custom functions.

Delete a white space using css

You may add this to your custom CSS in order to remove margin bottom of price and reduce this white space : p.price { margin-bottom: 0; }

Load CSS in footer, like your can with JS?

Yes, technically you can. But you shouldn’t load css in the footer, css links outside of the <head> are considered invalid. A better technique would be to add the css-links to the dom with javaScript. You may even want to split out the css so that critical portions are loaded inline (so you avoid a … Read more

what could cause get_stylesheet_directory_uri() to fail?

That would be because get_stylesheet_directory_uri only returns a value. If you want to echo it to to the screen you have to include echo or print. <img src=”https://wordpress.stackexchange.com/questions/35384/<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg” /> bloginfo works fine as well, but when you do stylesheet_directory it’s just a wrapper for get_stylesheet_directory_uri <?php function get_bloginfo( $show = ”, $filter=”raw” … Read more

What makes WP so SEO friendly?

When you hear about SEO-friendliness of CMS it is essentially same as for static page – how URL looks and what gets into source of page. Essentially WP is considered SEO-friendly because: It is easy to get pretty permalinks enabled and working There is large choice of themes and plugins, aimed at following recommended SEO … Read more

Code working just in specific time period

You could filter body_class and add a time depending class: add_filter( ‘body_class’, ‘time_body_classes’ ); function time_body_classes( $classes ) { $classes[] = ‘time-‘ . date( ‘a’ ); // time-am or time-pm $classes[] = ‘time-‘ . date( ‘H’ ); // time-02 or time-17 return $classes; } Then you can make the CSS selector more specific: .time-am iframe … Read more

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