When we go into Settings >> Media from our WordPress dashboard, we get to set three standard image sizes for our WordPress blog – Thumbnail size, Medium size, and Large size. Next time we upload an image, the image will be saved in its natural size (i.e., Full size) as well as in the three…..
There are a variety of administrative WordPress hooks that are applied on a page by page basis. Some good examples can be found in the WP_List_Table object. Example hooks based on screen ID manage_{$screen->id}_columns – Add or delete columns from various administrative pages. views_{$screen->id} – Display the number of objects belonging to each status type……
Theme Switching is the process of providing the ability for the user to change the presentation styles or “look” of your site with the use of a Theme Switcher. The process of changing your WordPress Theme by the site Administrator is not called theme switching. ~~[ WordPress Codex ] If we wanted to switch themes…..
If we want to create our own permalinks for custom post types, we can do so by using the WP_Rewrite WordPress object. We can also create our own permalink rules from scratch, by using the same object. One very important function while creating permalink rules is the $wp_rewrite->flush_rules() function. This function does the following -…..
If you want to add javascript files to your WordPress pages, then a good way to do this would be through the wp_enqueue_script command. wp_enqueue_script has the following advantages – It ensures that a script only gets included once. It allows you to specify script dependencies. For example, script1.js should be loaded before script2.js. It…..
Currently, we cannot add tags and categories to our WordPress pages. Why add tags to pages? Tags are very useful. They can be applied in a variety of non-standard, but powerful ways to enhance our blogs. I use tags to filter out file loads and certain types of plugin operations. For example, I only run…..
Recently, I wanted to move several of my existing WordPress blogs into a single WordPress multi-site setup. After doing so, I realized that all of my image links were broken because WordPress multi-site has a different organization for their media files. In particular, images no longer reside in the wp-content/uploads directory, but rather in the…..