Jump to content
Sign in to follow this  
mlundsveen

Features, most viewed posts with images

Recommended Posts

mlundsveen

Hey I'm sure somewhere this question is already answered but I could not find it anywhere (used a day to try to solve this problem now). I want a Feature (slider) to show resent posts on my landing page. Yes I know this part is easy. But where the hard part start, is to get images in this resent post feature. I want the image to fill the feature element and then only the headline of the post to appear over it (cutting out the rest of the text I easily fixed with CSS hidden). Anyone have a solution for this? Im using this for a sports news site and want new/(preferably)"most viewed" posts on the landing/index page so the visitor just can click on the slider and go to the post associated with it. Dont really want to make a new slider manually all the time.

Share this post


Link to post
Share on other sites
cmunns

So then wouldn't you apply your featured image as the feature background image so it goes full-width?

Share this post


Link to post
Share on other sites
mlundsveen

The easies solution is always the hardest to see for yourself. Thanks for the incredible quick and informative answer. Follow up thought, two things. Is there anyway to make wordpress resize the image to fit the window? And is there anyway to take the image from the post? So the user don't have to upload the image especially for this. For instance, the first uploaded image in the post is used for the featured image.

Share this post


Link to post
Share on other sites
Kate

Hi Michael, If I'm understanding you correctly, there's nothing built in to allow for that, unfortunately. As for the image source: The way the features are setup is to specify an image or background image while adding a "feature". Or it will use the "featured image" if you're pulling from a specific category. Unfortunately you can't use the first attached image without modifying the PHP.

Share this post


Link to post
Share on other sites
mlundsveen

Yea I figured so much. How much PHP do I need to edit to be able to do this then? I understand the basic concepts of php but thats it for now.

Share this post


Link to post
Share on other sites
cmunns

If the original featured image that you add to posts are 960px wide then it should fit the full feature slide portion, but it can't exceed its original size.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×