WordPress Image Size –
How to Add a New Image Size
by ShibaShake on

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…..

How to Get the WordPress Screen ID of a Page
by ShibaShake on

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……

Switch_Theme vs. Theme Switching
by ShibaShake on

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…..

Expand the WordPress Quick Edit Menu
by ShibaShake on

The WordPress Quick Edit menu allows us to quickly modify certain object attributes without having to go into the full object Edit Screen. The Quick Edit menu uses javascript to display the edit interface, thereby saving us time and additional calls to our WordPress server. The first step towards expanding our WordPress Quick Edit Menu…..

How to Flush Permalink Rules with flush_rules()
by ShibaShake on

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 -…..

How to wp_enqueue_script After wp_head
by ShibaShake on

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…..

Add Tags and Categories to Your WordPress Page
by ShibaShake on

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…..

Mastering the WordPress Loop
by ShibaShake on

The WordPress Loop is one of the key structures in any WordPress blog. It is used to control which posts are shown on each and every one of your blog pages. In addition, it is also used extensively on your WordPress Dashboard. For example, when you click on Posts on the left navigation bar, a…..

WordPress Links – How to Replace Post Links in Bulk
by ShibaShake on

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…..

add_menu_page, add_submenu_page
by ShibaShake on

The add_menu_page and add_submenu_page functions are used to add menu and submenu items to our WordPress dashboard. For example, in the screen-shot below, we have added a new Shiba Themes menu. It contains the submenus Shiba Themes, Add New, and Theme Options. Here we consider some common tasks that we may want to perform using…..

search button search button
rss