Tag Info

Hot answers tagged

4

First thing to mention is that you don't need to use wp_register_style if enqueuing within the same function. You can replace it with wp_enqueue_style and remove the duplicate. As for why your stylesheet isn't loading, start by checking the file path. Try this instead: wp_enqueue_style('cl-chanimal-styles', plugin_dir_url( __FILE__ ) . ...


2

Have a look at post_class(). Check if the theme using it (every good theme should). If so then you can use post_class filter to add appropriate classes to the container. Here is an example how you can use that filter add_filter('post_class', function($classes){ if(!is_singular('song')) return $classes; $additional_classes = ...


2

You can set the priority in hook. Priority is the 3rd parameter in the hook. In the following example, wp_enqueue_scripts will have priority of 99 which is higher than normal priority. Default priority is 10. So it will load at last function load_last_style() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', ...


2

Did you try .post-156 h1{ color: #666666 !important; } If one of your wrapper elements, like <article> is unsing post_class() the post ID becomes a class of this wrapper like .post-156. So you can say all h1 which are contained in a wrapper with the class .post-156 Another possibility, if your <body>-Tag is using body_class(): ...


1

First of all, never use query_posts, use WP_Query to create additional queries. You can target specific post positions in the loop by using the built in current_post var of the query object. Here's an example using the post_class function: <?php $my_posts = new WP_Query( array( 'posts_per_page' => 3 ) ); if( $my_posts->have_posts() ): while( ...


1

Per this answer, the key to getting the styles to appear in the dropdown is to unset($settings['preview_styles']); add_filter( 'tiny_mce_before_init', 'fb_mce_before_init' ); function fb_mce_before_init( $settings ) { // customize as desired // unset the preview styles unset($settings['preview_styles']);` return $settings; }


1

Basically you need to check if the font were made White by editing the CSS or using Customizer, and accordingly restoring the CSS or the Entire theme is suggested. Also try changing the theme to a default one and then back to this one.


1

This should be do with the following reason css loaded partially. conflict Js or missing. some function not works not server which fire the fatal error if this exists then you need to change on you wp-config.php file which is located at server: change this code : define('WP_DEBUG', false); to define('WP_DEBUG', true); which show you actual error.


1

Without being rude, it will probably cost more to fix what you break instead of asking them in the first place! - however, you can't learn until you break!. If I were you and you are interested in trying to play around with CSS/HTML - then you could always install Wordpress locally on your Mac/PC, there are plenty of guides around & Videos on youtube. ...


1

Context: accessibility guidance says forms should have labels. The theme designer obviously decided they didn't want the label there but used that CSS trick to move it without (completely) disobeying the guidance. However, that code only hides the search form label off the left of a page in English (or other Left to Right language). Since Hebrew is Right ...



Only top voted, non community-wiki answers of a minimum length are eligible