WordPress tag widgets display tags in a tag cloud by default. Here’s how to override that default behaviour; specifically, how to display WordPress tags as lists.
WordPress 5.3 introduces a new way to manage images by detecting “big” images and generating a “web-optimized maximum size” of them. How does it work? When a new image is uploaded, WordPress will detect if it is a “big” image by checking if its height or its width is above a big_image threshold. The default threshold value is 2560px, filterable with the new big_image_size_threshold filter. If an image height or width is above this threshold, it will be scaled down, with the threshold being used as max-height and max-width value. The scaled-down image will be used as the largest available size. In this case, the original image file is stored in the uploads directory and its name is stored in another array key in the image meta array: original_image. To be able to always get the path to an originally uploaded image a new function wp_get_original_image_path() was introduced. Disabling the scaling The scaling is controlled by the big_image_size_threshold filter. Returning false from the filter callback will disable it.
WordPress does not include a function to check if is_subpage. This function provides that for us.
Fires after the query variable object is created, but before the actual query is run. pre_get_posts
In this article, I’ll show you how to add custom user instructions just below the featured image metabox, to help make it easier for end-users to upload a featured image that won’t break the design.
Sometimes, I want to run code on specific WordPress admin screen only. It is possible using the get_current_screen() function and checking it against the actual current screen.