Jump to content
Sign in to follow this  
liverpoolfootballblog

How to display latest post as a large feature image and not repeat?

Recommended Posts

liverpoolfootballblog

Hi there, How can I use the feature section to display the latest post as a static 600px wide image with Title? I don't want the post in the feature section to be shown again underneath with the loop. Rather than selecting a category how can I select it to show the latest post? If that's not possible with the feature section, is there some code I could use?

Share this post


Link to post
Share on other sites
cmunns

Is your home page the main blog page, but you want the first post to be really big with an image as described?..or is it a static home

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Hey Adam, yeah my home page is the main blog page and I'd like to have the latest image as a big image. Here is my site.

Share this post


Link to post
Share on other sites
timlinson

Keep getting "error establishing database connection"

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Ah that's probably just because of my host having some down time. Try again: Liverpool Football Blog Otherwise here's a screenshot: Screen-shot-2011-06-17-at-6.38.43-PM.png I want the first picture of the guy in Red kicking the ball to be the full width of the main content pad with the Title and excerpt to be displayed underneath.

Share this post


Link to post
Share on other sites
kastelic

Maybe you could utilize a hook like pagelines_before_theloop and make a custom loop there that shows just the_title() and the_post_thumbnail('medium') or something like that. Then I guess you'd have to hide the first post from the main loop.

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Thanks Jimmy, legend! I got the feature image displaying. Now, how do I hide the most recent post?

Share this post


Link to post
Share on other sites
kastelic

Try this line of jQuery in Custom Code -> Footerscripts:

<script>
	jQuery('.post:nth-child(1)').hide();
	</script>

It will hide the first element with class of "post".

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Jimmy, Thanks but that didn't work. I'm using magazine mode, showing two post with images and then the rest in two columns with no image. That jquery code hid the left hand column of the posts without images. Any ideas why or how to fix it?

Share this post


Link to post
Share on other sites
catrina

Your site isn't loading for me after waiting for awhile. Are you experiencing this problem, too?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
liverpoolfootballblog

No I can log in. It's in maintenance mode though so you won't be able to see the site.

Share this post


Link to post
Share on other sites
liverpoolfootballblog

What can I use instead of: jQuery('.post:nth-child(1)').hide(); in order to hide just the first post? Cheers.

Share this post


Link to post
Share on other sites
cmunns

To hide the first post you would probably just use something like this in your functions file ` add_action('pagelines_before_theloop','offset_post'); function offset_post(){ if (is_home()): query_posts('offset=1'); endif; } `

Share this post


Link to post
Share on other sites
liverpoolfootballblog

Thanks Adam that worked, I just have two more small questions. First. As you can see, once I click on the image and it takes me to the individual blog post, the image and title is shown twice. How can I hide the first image (which is the new one that I created with php)? Second. With the new image (which I created), you can see it doesn't display the author in the metabar. What can I add to functions.php to correct that? Thanks again. sOA3u.jpg

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  

×