Articles of images

What can i do add title to 'large' image?

<?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘large’); echo ‘<a href=”‘ . $large_image_url[0] . ‘” >’; the_post_thumbnail(‘medium’); echo ‘</a>’; } ?> This code adds a big image to the thumbnail image. What can I do add title to ‘large’ image?

Display different header images based on current page

I want to display, based on the current page another header image. Short example: Home -> Image A PageId 1,2,3,4 -> Image B (2,3,4 are childs of page 1) PageId 5, 6 -> Image C … I tried to edit the header.php of my theme, because there is the coding block which displays the header […]

Are seven additional image sizes are too many?

I am developing a theme which uses different image sizes. So I will be adding 7 image sizes, are they too many? Could that break anything like the image size selector, other parts of the interface or upload performance? Also, is it a bad practice to remove the default image sizes from the theme for […]

images not showing despite using add_theme_support('post-thumbnails');

I’ve got a system for post images where I have a specific category’s post thumbnail shown in the header, with a cropped version appearing in the blog #preview, and the full size image appearing in the full post. Images are not appearing in any of the 3 locations, and I’m not quite sure why. functions.php- […]

How to display original unmodified thumbnail

I have uploaded a few images that are being used as thumbnails. I cropped them within WordPress to be square and focus on the subject of the image. I have also got a slider that is rectangular and shows one image at a time. At the moment the sliders displays each posts thumbnail which is […]

Retrieve Image Attachments Getting Post Thumbnail Image First

I have written a funtion to get post image attachments, is there any way of ordering these images such that the first is always the post_thumbnail? Code below Thanks John function oliver_single_gallery_thumbs() { global $post; $args = array( ‘post_parent’ => $post->ID, // For the current post ‘post_type’ => ‘attachment’, // Get all post attachments ‘post_mime_type’ […]

How to obfuscate theme directory URLs

I’m rewriting this question because I realized it was totally unclear what I want to do. I’m looking for a way to “obscure” the theme directory so that absolute URLs that reference things like images and stylesheets in that theme directory don’t have the “wp-content/themes/my_theme/” structure, but are rather more direct, like a normal website, […]

Autosort uploads in galleries by filename

A client of mine wishes to not have to sort images uploaded into a post gallery, but instead rely on its filename for sorting (e.g. “01_sample.jpg”, “02_sample.jpg”). This would save a lot of time for the client, and I’m wondering if this is possible to achieve using WP 3.5+ and the recent changes to Add […]

Get custom thumbnail sizes

This question already has an answer here: Get post thumbnail size 7 answers

How can I use wp_save_image_editor_file filter?

I would like to use wp_save_image_editor_file filter, but there is no documentation on the internet. Also, it seems that no matter how many arguments I pass to the handler, all are null.