With get_post_thumbnail()
you have the ability to insert a featured image in your theme.
the_post_thumbnail( $size, $attr );
holds to parameter 1. The size of your image and the ID.
If you would like to have 2 image sizes of featured images on your home page you could do it like this:
if(is_front_page(){ // only on frontpage
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail($post->ID, array(320,320));
}
}else if(is_page()){
if ( has_post_thumbnail() ) {
the_post_thumbnail($post->ID, array(120,120));
}
}
Related Posts:
- How to give image source in wordpress page editor?
- Natural URL Design and static front page
- How to use custom Html file instead of wordpress homepage
- If its not frontpage
- Default image for homepage when shared in social media
- Changing the homepage
- custom, static home page / landing page with Twenty Eleven theme?
- How to get the original post_id of a static home page?
- How to only show the first X words (from each post) on the home page?
- How to create an archive for all posts that do not have a post format?
- home.php or frontpage (via settings) for theme?
- How can I make WordPress serve homepage to different URL?
- Query string becomes encoded when a static page is used as homepage
- How do I make my single-work page show on my front-page.php?
- Speed of the slider images should be increased in wordpress
- query_vars in home, not loading the “home” page
- get_home_path() returning error 500
- Insert Latest Articles in Homepage
- is_home() in HTML head
- How do I make the main page be the blog page and not a separate “home” page?
- Testing if current page is the static page set as home page
- When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load
- In db https is used for home, but in backend http is used and cannot be edited
- When does WP ignore content added through the backend editor?
- Create a front page template and separate page for posts?
- How can I upload an image for background use using the Theme Editor in WordPress?
- my homepage does not have SSL but another page is ok
- Allow a static page to show on a dynamic home blog page before the posts
- How to make a video play for homepage?
- How to get the true permalink of the static home page?
- Why does my homepage sometimes shows up in black and white text?
- Hero image cropped at different dimensions
- How do I make a page appear like the “Your latest posts” from homepage display options?
- static homepage no longer shows [closed]
- How can I make a portion of the home page user configurable?
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- Main timeline in a different path
- How can I confirm I’m on the home page
- How can I show/hide HTML elements if the page is_front_page
- Try to run a function only on Home
- Using a conditional tag for the home page banner
- How can I make my posts on my home page just show summaries?
- Recent posts on homepage
- wp-admin/admin-ajax.php – Slowing My Site down
- How not to show leave a Reply to Home Page?
- Automatically set Homepage
- Merging two pages into one homepage
- How do I get my blog posts to appear on homepage?
- How do I make a page the landing page?
- WordPress Home Page
- improve my array to display the_title, category, excerpt for homepage
- index.php isn’t front page but shows as it is
- Static homepage duplicate issue
- Finding the index page using the admin panel of wordpress
- Different banner on home page
- Coming soon page used instead of home page
- Delete Title and Icone in Homepage
- Homepage white screen after migration server
- I want to load a pre-built php page (and assocated scripts/styles/directories) as the front page. How do I go about this?
- Working with WordPress theme
- Make Home page current if there are sub-menus
- Accidentally deleted the ‘home’ page as my front page, can someone help?
- Making draft page as the main page
- Contributors should only access home page
- Random home page background images with caption text
- Show latest posts on responsive theme
- Different URL for homepage then all your other pages
- How to make my Home button on the menu redirect to my root page
- wordpress help needed. How to display both home.php and index.php?
- Problems with homepage in different browsers
- Homepage Duplicated with each Post
- How do I get the Revolution Slider in the header on the homepage, but not the blog index page?
- What is the difference between `Home page / Archieves` and the page set as homepage?
- Remove/Redirect /page/ from homepage WordPress
- Blog featured images disappeared on my homepage
- Blog images not showing on homepage
- Delete Title Bar
- Why 2 home pages?
- How Create Different Layouts For Single WordPress Theme?
- homepage not fully loading after loutout
- div show on home page only not in paged
- Automatically change home page [closed]
- Edting Homepage text cannot find in homepage
- How to get different homepage layout, based on the URL and customizer
- Which file is the theme index page?
- Homepage only shows URL after moving to different server
- Adding language attribute to homepage
- Override static home page post
- Style post formats differently on the home page
- Show sticky blog post on homepage
- Change header when on home page
- Set header for default posts page?
- blog page showing as home/landing page despite template change and reading settings
- how to show the most viewed, random and recent posts in the home?
- Set home page to last page of a certain category
- Hompage showing page from different theme
- Adding slides to an existing carousel manually
- How to display both home.php and index.php
- How do I edit my WordPress front page which doesn’t show in the admin pages area?
- I have front error for open website [closed]