0
votes
1answer
46 views

Add 'if exists' to filter

This almost perfectly fixed an issue I had: How do I add the featured image to the_content after the first paragraph? However, if there isn't a featured image, the code still outputs a blank <img ...
0
votes
1answer
65 views

cant output grayscaled ive created using add_image_size

I am trying to create a gray scaled image of the image i upload. I have been able to upload the image and create the gray scaled version by using this code: ...
0
votes
1answer
55 views

How to disable thumbnail filter for a specific template part or image size?

I am filtering post_thumbnail_html in my theme to modify the output of my image tags. I have one template part that I would like this filter not to apply to. It uses an image-size that is used no were ...
0
votes
2answers
149 views

Wrapping Featured Image on Add/Edit Page in div?

is it possible to wrap the featured image on the add/edit page in a div or other code? I don't mean on the front page of the website, but on the back end on the add/edit pages when you're typing up ...
0
votes
1answer
285 views

apply_filters to featured image

I have a page where I have embedded the page using these lines of codes at function.php: //------Embed Content------ //Title function CustomFunction_ShowPage_Title($id) { $post = get_page($id); ...
1
vote
2answers
646 views

Adding schema itemprop image to the_post_thumbnail with filters

I have tried to apply filters to the_post_thumbnail() function using apply_filters( 'post_thumbnail_html', $html, $post_id, $post_thumbnail_id, $size, $attr ); Here's the code I have come up with ...
2
votes
3answers
3k views

How do I add the featured image to the_content after the first paragraph?

My problem: I'm trying to create a filter that will add the featured image of a post to the_content, so that I can have the first paragraph of the_content displayed before this image. What I basicly ...
0
votes
2answers
1k views

How to replace the_post_thumbnail template tag and show the first inside the post image instead

I want WordPress to return the first post image or a default image if no featured image has been set. My theme uses the_post_thumbnail many times, so I don't want to go through and change all ...
0
votes
1answer
219 views

Add filter on certain thumbnail sizes only

How to run this filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium' .... add_filter( 'wp_get_attachment_image_attributes', ...
0
votes
1answer
84 views

add_filter with specific thumb names

How would I run add_filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium', etc?
0
votes
2answers
616 views

Filter for post_thumbnail: link to small src and add data-attribute

I wonder how I can link manually to the smallest filesize for the_post_thumbnail() within its filter function … add_filter( 'post_thumbnail_html', 'post_thumbnail_html', 10, 3 ); function ...
0
votes
1answer
311 views

How to move featured image to the top of the list?

I have been working on using featured image to create a list of items on the right column here: http://www.julianamaeberger.com/soma/news/ The current featured image is now being given a class of ...
1
vote
3answers
9k views

Remove title attribute from images

I'm looking for a way to remove the title attribute from images, preferably through using a hook or a filter. Most clients don't bother giving images a proper title, thus eliminating the purpose of ...
24
votes
4answers
14k views

Filter to remove image dimension attributes?

I'm working on a site based on a fluid width css template which sets a max-width on images to the width of the column containing them, and I need to remove the inline width and height dimension ...
0
votes
1answer
493 views

How to show a featured image as current?

On the right rail here: http://www.julianamaeberger.com/soma/sample-testimonial-3/ I am showing a random post "Testimonial". Below that I am showing all featured images for the category "Testimonial" ...
2
votes
2answers
2k views

Best way to filter featured image text for a custom post type?

I am trying to change the "Set featured image", "Remove featured image", and "Use as featured image" text links of a custom post type for my plugin Meteor Slides. I found the ...