Category: Wordpress

How to Use Animated GIFs as WordPress Featured Images

How to Use Animated GIFs as WordPress Featured Images

When you upload an animated GIF to WordPress, it does all of it’s resizing magic to make the various thumbnail sizes (defaults are thumbnail, medium and large, in addition to the original full). When it does this, the resized versions lose their animation.

How to rename your WordPress wp-content directory

How to rename your WordPress wp-content directory

If you have been working with WordPress, you probably already know that all assets like images, stylesheets, themes, and plugins in WordPress are by default, stored under the /wp-content/ directory. But, do you know that we can actually change this folder name into something else, and yet it will still work?

How to get a post thumbnail URL of a certain size

How to get a post thumbnail URL of a certain size

Input data: $post_id – ID of the post $size_thumb – e.g. array( 300, 300 ) or a standard / registered name like “middle” etc. function get_thumbnail_post_url( $post_id, $size_thumb ) { $image_id = get_post_thumbnail_id( $post_id ); $image_array = wp_get_attachment_image_src( $image_id, $size_thumb ); $image_url = $image_array[0]; return $image_url; } function thumbnail_post_url( $post_id, $size_thumb ) { echo get_thumbnail_post_url(…

Read More Read More