WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Featured Image for Homepage? (3 posts)

  1. KevinWalter
    Member
    Posted 7 months ago #

    Hello. I'm building a site for a client and I don't normally work with WordPress. The theme is functional and I'm in the process of styling it.

    My problem is, the design calls for a large image to be placed directly under the header... not unlike a slider... on the homepage.

    I don't quite know how to do this. I could add it directly to the page itself, as the home page is rather simple and has no sidebar, so the content is the full width of the page. But that could get complicated if my client decided to change it.

    Is there any way that I can set featured images on pages and then call the featured image into my homepage template? That way, if my client wants to change the image, all she needs to do is select a new featured image...

    That would be fantastically simple.

  2. RachelGoldstein71
    Member
    Posted 7 months ago #

    Yes - figure out what template is being used for the home page. (You can do this with the Which Template plugin). Then, add an if statement to test for whether this is the home page. If it is, then serve up the featured image.

    https://codex.wordpress.org/Function_Reference/the_post_thumbnail

  3. KevinWalter
    Member
    Posted 7 months ago #

    I actually ended up just using the Easing Slider plugin. It seems easy enough to edit, and with only one image loaded into the slider, it acts exactly how the other option would anyway. And if my client wants to add more and create a real slider, it's simple enough for her to do that.

    Thanks for the info, anyway. Never know when you'll need tips like that in the future...

Reply

You must log in to post.

About this Topic

Tags

No tags yet.