CSS not updating in browser when I change it

Add a random version number at the end of the css file you are attaching. If you are using ‘wp_enqueue_style‘ or wp_register_style functions, pass a random (version) number rand(111,9999) to 4th parameter. If you are attaching css as an html tag, you should add “?ver=<?php echo rand(111,999)?>” at the end of the file name. Examples … Read more

How important is it to enqueue a theme’s stylesheet?

It’s important to enqueue the stylesheet because it will allow child themes the flexibility of dequeueing it as well as allowing it to be listed for dependencies and a multitude of other things. It just generally allows greater flexibility, both for you and for any other developers who interact with your code. It’s also important … Read more

How to add custom css file in theme?

I usually add this piece of code if I want to add another css file <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/58351/<?php bloginfo(“template_url’); ?>/css/my_custom_css.css” type=”text/css” media=”screen” /> I believe the theme makers want to retain as much as possible of the theme’s layout design. So a custom css file doesn’t hurt much. I think it’s more of a support … Read more

How to show a custom meta box on the “Quick Edit” screen?

There seems to be no easy way to do this, you must add all code yourself. inline_edit_row(), the function that draws the Quick Edit and Bulk Edit screens, seems to have only one action that you can hook into: quick_edit_custom_box or bulk_edit_custom_box. It gets called for all non-core columns that wp_manage_posts_columns() returns. There are some … Read more

What is the advantage of using wp_mail?

wp_mail() is a pluggable function: It can be replaced by plugins. That’s useful in cases where the regular mail() doesn’t work (good enough), for example when you need extra authentication details. Example: WP Mail SMTP wp_mail() uses PHPMailer by default, a sophisticated PHP class which offers a lot of useful preprocessing and workarounds for cases … Read more

What is a Theme textdomain?

In this case, ‘themify’ is the defined textdomain for the Theme, used to make the Theme translatable. (Codex reference: load_theme_textdomain()). Making a Theme translation-ready requires a few steps. Define the Theme’s textdomain: load_theme_textdomain( ‘themify’, TEMPLATEPATH.’/languages’ ); Define translatable strings in the template. This is done using one of a few translation functions: __() (for returned … Read more