0
votes
2answers
186 views

How do I change/modify the_post_thumbnail(); html output?

I'm working on building out a custom theme and have been struggling with this one for a bit. I am trying to modify the HTML output of the_post_thumbnail(); function. I need to do this because I am ...
0
votes
0answers
95 views

Set thumbnail from URL, by grabbing image in functions.php

So I've written a whole bunch of functions, which are used to display Vine videos. I then have a shortcode which outputs the code. The last thing I have to do is set the post thumbnail. I want to be ...
0
votes
1answer
27 views

Overwriting a Shortcode

I have a theme that extends the Visual Composer plugin with a slider on the front page. The slider will show five testimonials from five different customers. I want to add the featured image of each ...
-1
votes
1answer
31 views

Display Video as Post Thumbnail

I use the Nova free theme, from the Theme in Progress studio. I would like to display a video like a thumbnail image, as shown in this theme http://themeinprogress.com/demo/sueva/ How can I do this? ...
1
vote
1answer
76 views

How to set the jpg image compression for specific thumbnail sizes?

This question was asked on Set JPEG compression for specific custom image sizes and answered very nicely by Ahmad M I'd of course comment to that thread but I don't have 50 point reputation... The ...
1
vote
1answer
120 views

Function to auto-set a featured image that is already in use

I don't even know where to start with figuring this out.... This function for functions.php grabs the first attached image in a post and sets it as the featured image. The problem is that it will not ...
0
votes
2answers
27 views

add_theme_support not outputting thumbnails

so, i wanted to thumbnails in my query and i came across add_theme_support, it says you have to have that to enable actions such as thumbnail, so i put the following in my functions function ...
-1
votes
1answer
33 views

add if statement to the featured image

I have a featured image. I want to add an if statement to the size. For example, if the featured image height exceeds 500px I want to add something. Is that possible ?
0
votes
3answers
56 views

Show Featured Image in else statement

This is how i am loading the post thumbnail image ? What if there is no image, i want to show a default image ? How can i show that. Here is the code i use to display thumbnail. $html .= ...
0
votes
1answer
230 views

Random Featured Image Based on Category

I am looking to extend the below code to select a random featured image based on a specific category. The below works but uses an overall list of images to pull from vs a list of images based on ...
0
votes
2answers
136 views

Get the alt text of the image in a array

I have a php code. That put the thumbs on the screen. I have this: <?php if (has_post_thumbnail()) : ?> <div class="image"> <?php $attachment_id = get_post_thumbnail_id(); ...
0
votes
2answers
207 views

How to add icon over specific thumb

i m not so good with php, but i wanted to do this, and i know its possible, but i dont know how. I m looking at http://codex.wordpress.org/Function_Reference/in_category but it doesnt make to much ...
0
votes
0answers
169 views

Full size image option removing problem

I have removed the Full size image option from the media upload window see Code: function theme_t_wp_set_image_size_options( $sizes ){ $sizes = array( 'thumbnail' => 'Thumbnail', ...
0
votes
1answer
146 views

set_post_thumbnail when user is not logged in

I'm currently using the set_post_thumbnail() function to insert a programmatically uploaded image to a post. The problem is that the function works perfectly when the user is logged in only. If the ...
0
votes
1answer
158 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); ...
0
votes
1answer
56 views

resizing of thumbnails not working

i have the following in my functions file from the wordpress codex <?php add_filter('show_admin_bar', '__return_false'); if ( function_exists( 'add_theme_support' ) ) { add_theme_support( ...
1
vote
2answers
293 views

Make WordPress size and name images for Retina.js

I'm a huge fan of the way retina.js works for high pixel density displays. Essentially, when it's loading image assets (via <img> or css image) it will check if there's a @2x suffix version of ...
2
votes
2answers
114 views

Setting featured image with function, 1 part not working

I'm trying to set a post's featured image based on custom fields. There are different types of posts and therefore the featured image should be set depending on which custom fields have been filled ...
-1
votes
1answer
105 views

Image width issue in IE [closed]

For some reason images are being displayed as a thin line in IE 8 and earlier and i cannot work out why this could be. I'm using CSS to re-size the images for the homepage, the reason for me using CSS ...
1
vote
1answer
477 views

Getting Featured Image Caption to Only Show if Populated

Good evening! I'm trying to hide the featured image caption from showing. Currently, it'll show build the div (but not populate it because it's empty). What I'd like to do, ideally, is only show the ...
0
votes
2answers
324 views

Featured Image keeps cropping

I've spent hours trying to figure this out and its driving me mad. I'm not great with php code so I'm not sure if I'm doing this the best way anyway... It should be simple - I have built a custom ...
0
votes
2answers
1k views

is there a way to remove featured image from blog page and single page

<?php /* * * The default template for displaying content. Used for both single and index/archive/search. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ...
1
vote
1answer
765 views

Add a Post Thumbnail to an RSS Feed with custom size

I have two different blogs on the same domain and my goal is to get the 3 latest posts from blog1 to show on the home page of blog2. Everything goes well following these instructions: ...
0
votes
1answer
148 views

Add_image_size not generating correct size

I have 2 additional image sizes i've added to my theme and the for some reason when I use the Force Regenerate Thumbnails plugin, my images are created but the files sizes are not exact. Here is the ...
1
vote
3answers
800 views

the_post_thumbnail fallback using hooks

I am using this big theme that is almost entirely relying on widgets and sliders. Now I trying to avoid looking for post_thumbnail output code in all the included files in order to achieve fallback ...
0
votes
2answers
71 views

Post-thumbnail only for specific post-types?

I have this in my functions.php add_theme_support( 'post-thumbnails' ); This means all my post-types (normal posts and custom-post-types) have post-thumbnails enabled. Is it possible to just ...
0
votes
2answers
1k views

Get the 5 lastest Featured Posts from a category

Here is the website http://ariadneswonderland.gr/ that all this concerns. On the homepage I'm using a Drop shadow box plugin under the gallery to show a series of images of featured posts, as of ...
0
votes
1answer
683 views

How to make excerpt image be full size instead of thumbnail?

Now when I have excerpts on the home page the image is a small square, but I'd like to change it to a fill the entire width of the content area. (as if the image was in a post.) My theme is responsive ...
-5
votes
1answer
130 views

MIssing feature image link function

I need to be able to add a feature image to a post as a link. The link is good, it's green check. And no i cannot upload the file and insert into post dont do anything good. I have the link to the ...
3
votes
2answers
1k views

How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?

I would like to create a condition that checks to see if a post has a thumbail and if it does display it, otherwise display the first image in a post. I tried something like this in my loop.php but ...
0
votes
1answer
674 views

show all the posts thumbnails

I want to display all the posts by the featured image of each post. Is there a shortcode or can you give me some tips on how to achieve this ? Thanks!
0
votes
2answers
5k views

How come Featured Image isn't showing up in my Custom Post Type?

I have thumbnail support added with the following in my functions.php // Add Thumbnail Support add_theme_support('post-thumbnails'); set_post_thumbnail_size( 140, 140, true ); And I create the ...
1
vote
1answer
378 views

How to Display Image Meta underneath EVERY image in EVERY post

First off, I want to say thank you for taking the time to even read this, I really do appreciate the help this site and it's community has given me thus far. i have looked forever to be able to ...
0
votes
1answer
504 views

How to hide image-url if no attachment?

How can I hide the img-tag if there is no attacment? (function is from this tutorial: http://wp.tutsplus.com/tutorials/automagic-post-thumbnails-image-management/) <img src="<?php ...
2
votes
2answers
2k views

How to change post thumbnail title and alt attributes to post title?

Can we change the title and alt attributes of the_post_thumbnails and set them to post title instead ? like creating a function for it and adding a filter ? I tried searching but I can't seem to find ...
0
votes
3answers
661 views

struggling with syntax for the_post_thumbnail();

i want to display the alt text for a featured image. I've been using the the_post_thumbnail(); function to display the image like this: if ( has_post_thumbnail() ) { // check if the post has a Post ...
2
votes
1answer
328 views

Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory

I have a bunch of old posts on a blog that I would like to assign a featured image to. I have retrieved all the images I would like to use for each post. I saved each image file name after the slug ...
0
votes
1answer
81 views

include w_thumbnail_src in function?

I got a function that automatically creates a custom field in the post. I have this located in my functions.php. Image is the name of the custom field and HERE is the value. How can I put the ...
1
vote
1answer
1k views

Delete Post From Front-End and attachment permanently

Is there a way to delete a Post From Front-End and it's attachments permanently? This is a snippet that moves the post to the trash can, but it doesn't remove attached images (they remain on the ...
2
votes
2answers
862 views

Linking thumbnail to full size image

I use a function in my blog (getImage) to call thumbnails in the loop (it calls the 1st image on the post) but instead of link to the post, i would want the thumbnail to link to its full image src. ...
4
votes
2answers
691 views

Prevent publishing the post before setting a featured image?

As the title says , I want a plugin/function to prevent/inform the user when he tries to publish the post without setting the featured image. ANY HELP ???