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

Adding CSS to custom post type admin page causes error

You need to check for the presence of ‘post_type’ as an index of $_GET before using it: if ((isset($_GET[‘post_type’]) && $_GET[‘post_type’] == ‘slide’) || (isset($post_type) && $post_type == ‘slide’)) : Also, you should be using the wp_enqueue_style function instead of echoing your stylesheet at ‘admin_head’: wp_enqueue_style( ‘meteor-slides-admin’, plugins_url(‘/css/meteor-slides-admin.css’, __FILE__), array(), ‘1.0’ ); More information on … Read more

What is the meaning of WordPress’s recommended css classes and where are they applied?

These classes are generated by WordPress. For instance, if a user inserts an image in his post and says it must be aligned right, WP will generate code like this in the post: <img class=”alignright” src=”https://wordpress.stackexchange.com/questions/247130/…”> Now, if your theme doesn’t define the alignright class, the image won’t be aligned right and the user won’t … Read more

responsive.css in the WordPress should be prioritized

If you want to make sure the second stylesheet loads after the first, you can use the third argument of wp_enqueue_style to set a dependency, eg: wp_enqueue_style( ‘styles’, THEMEROOT . ‘/css/style.css’, array() ); wp_enqueue_style( ‘responsive’, THEMEROOT . ‘/css/responsive.css’, array(‘styles’) ); As for having all the styles in responsive.css override style.css, that is going to entirely … Read more

Multisite domain mapping breaks CSS

This is an old question, but I just ran into this same issue and found the problem: the MU Domain Mapping plugin is using a deprecated constant, PLUGINDIR, to remap the plugin directories on the mapped domains. The plugin seems to be very vaguely developed nowadays (and no releases have been out for a year), … Read more