{"id":1896468,"date":"2019-10-18T13:19:11","date_gmt":"2019-10-18T17:19:11","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/featured-images-2\/"},"modified":"2026-04-21T20:35:34","modified_gmt":"2026-04-22T00:35:34","slug":"featured-images","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/featured-images\/","title":{"rendered":"Using Featured Images with Events"},"content":{"rendered":"\n<p>You might already be a lot more familiar with how the Featured Image works for The Events Calendar than you know. That&#8217;s because it&#8217;s built on top of the same Featured Image functionality that comes standard with WordPress.<\/p>\n\n\n\n<p>In this post, we&#8217;re going to dive into the concept of Featured Images a little deeper. We&#8217;ll review how to add them to an event post, cover how to style them in CSS and, lastly, how to change the size.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"events\">Adding Featured Images to an Event<\/h2>\n\n\n\n<p>Let&#8217;s say you have the most beautiful photo and it&#8217;s perfect for the event you&#8217;re about to publish on your site. How do we add that?<\/p>\n\n\n\n<p>From the single event editing screen (Events \u2192 Add New), head down to the Featured Image box in the lower right corner of the screen. It can be easy to miss because of how small and buried it is, but this is what you&#8217;re looking for:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2020\/02\/admin-editor-featured-image-1024x817.png\" alt=\"\" class=\"wp-image-1946071\"\/><\/figure>\n\n\n\n<p>Go ahead and click the &#8220;Set featured image&#8221; link. It will open a dialogue box that allows you to either select and existing image from your Media Library or upload a new one. Select the image you would like to use as your featured image, click the &#8220;Set featured image&#8221; button in the dialogue box, then you will be taken back to the editing screen and see the featured image in the box.<\/p>\n\n\n\n<p>Need to remove the image and select a new one? Click the &#8220;Replace Image&#8221; button beneath the image and select a new one.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2020\/02\/admin-editor-featured-image-replace.png\" alt=\"\" class=\"wp-image-1946072\" style=\"width:355px;height:334px\"\/><\/figure>\n\n\n\n<p>It&#8217;s worth noting that a featured image is not required for publishing an event. It&#8217;s an optional feature for dressing things up a little bit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"display\">Where Featured Images are Displayed<\/h2>\n\n\n\n<p>Featured images pop up in a few different places. The first place is the calendar views. In list-style views like list, day, and map (Pro only), the image will show next to the event. In month view and Pro&#8217;s week view, the image will show in the mouseover tooltip for each event. If you really want to showcase your featured fmages, you&#8217;ll want to use Pro&#8217;s photo view which shows the photos prominently in a tiled view.<\/p>\n\n\n\n<p>The other place you can expect to see a featured image is on a single event page. It will display at the top of the post, before the content.<\/p>\n\n\n\n<p>In the Block Editor, you can place a featured image block.<\/p>\n\n\n\n<figure class=\"wp-block-image alignnone size-full wp-image-1944088\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2019\/10\/block-editor.png\" alt=\"\" class=\"wp-image-1944088\"\/><figcaption class=\"wp-element-caption\">Inserting a Featured Image in Block Editor<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"css\">Styling a Featured Image with CSS<\/h2>\n\n\n\n<p>Let&#8217;s say you want to change the featured image so that it floats to the right instead of the left of an event in the calendar view. The Featured Image is always wrapped in the <code>.tribe-events-event-image<\/code> class, so we can use that to make the change in our CSS file.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.tribe-events-event-image {\n  float: right;\n}\n<\/pre><\/div>\n\n\n<p>Not bad, right? You can do the same thing to round the corners, add a border and increase the margins:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.tribe-events-event-image {\n  border: 1px solid #333;\n  border-radius: 5px;\n  margin-right: 35px;\n}\n<\/pre><\/div>\n\n\n<p>It&#8217;s even possible to hide the image completely from view. For example, this will hide the image from a single event page:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.single-tribe_events .tribe-events-event-image {\n  display: none;\n}\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-background\" style=\"color:#141827;background-color:var(--global-palette8)\">? Interested in knowing more about customizing calendar styles? Check out our <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/customizing-css\/\">CSS guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"size\">Customizing the Featured Image Size<\/h2>\n\n\n\n<p>One thing that comes up from time to time is how to change the size of the featured image. To do this, you will need to create a <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/customizing-template-files-2\/\">theme override<\/a> of the template where the Featured Image you want to edit is displayed.<\/p>\n\n\n\n<p>In that template, located where the featured image is called. It will look something like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; gutter: false; title: ; notranslate\" title=\"\">\nthe_post_thumbnail( &#039;medium&#039; );\n<\/pre><\/div>\n\n\n<p>See the &#8220;medium&#8221; variable in there? That&#8217;s the size! If your theme follows uses the <a href=\"http:\/\/codex.wordpress.org\/Post_Thumbnails#Thumbnail_Sizes\" target=\"_blank\" rel=\"noopener noreferrer\">standard WordPress sizing conventions for images<\/a>, you can change that to any of the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>thumbnail<\/li>\n\n\n\n<li>medium<\/li>\n\n\n\n<li>large<\/li>\n\n\n\n<li>full<\/li>\n<\/ul>\n\n\n\n<p>If you&#8217;re looking to further customize how WordPress crops your thumbnails, we&#8217;d recommend using <a href=\"https:\/\/wordpress.org\/plugins\/my-eyes-are-up-here\/\" target=\"_blank\" rel=\"noreferrer noopener\">this third-party plugin<\/a> to help you achieve that.<\/p>\n\n\n\n<p>Need more sizes? Head over to the <a href=\"http:\/\/codex.wordpress.org\/Post_Thumbnails#Add_New_Post_Thumbnail_Sizes\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress Codex<\/a> for more info on how to register additional image sizing options.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-adding-thumbnail-support-for-event-featured-images\">Adding Thumbnail Support for Event Featured Images<\/h2>\n\n\n\n<p>By default, The Events Calendar enables featured images on all event custom post types.&nbsp;However, some themes remove this functionality by declaring thumbnail support for only specific custom post types. You can use the snippet below to add back support for our event custom post type.<\/p>\n\n\n\n<p>Add the following to your child theme\u2019s&nbsp;<code>functions.php<\/code>&nbsp;or via the&nbsp;<a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">Code Snippets<\/a>&nbsp;plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_theme_support( &#039;post-thumbnails&#039;, &#x5B; \n  &#039;post&#039;, \n  &#039;page&#039;,\n  &#039;tribe_events&#039;,\n] );\n<\/pre><\/div>\n\n\n<p>We work hard to make our plugins compatible with as many themes as possible, but inevitably some theme\u2019s need a bit of custom code (like this snippet) to work smoothly with our plugins.\u00a0If your theme removes support for featured images on our events, you can always get in touch with your theme\u2019s developer and recommend that they update to be more compatible with our custom post types.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-making-featured-images-appear-when-sharing-event-urls\">Making Featured Images Appear When Sharing Event URLs<\/h2>\n\n\n\n<p>To control the data that appears on social sharing websites, we usually recommend using a SEO plugin like&nbsp;<a href=\"https:\/\/yoast.com\/social-media-optimization-with-yoast-seo\/\">Yoast SEO<\/a>&nbsp;or&nbsp;<a href=\"https:\/\/rankmath.com\/kb\/titles-and-meta\/\">Rank Math SEO<\/a>.<\/p>\n\n\n\n<p>Those plugins include Open graph meta tags, which can be used to inform social media websites which title, image, and description they should use.<\/p>\n\n\n\n<p>Out of the box, our plugins don\u2019t have a built-in method for changing the pictures or the title. However, if you would like to manage social media sharing images without relying on third-party plugins you can do it with a PHP snippet below.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_action(&#039;wp_head&#039;, function() {\n    if (is_single() || is_page()) {\n        ?&gt;\n        &amp;lt;meta property=&quot;og:title&quot; content=&quot;&amp;lt;?php the_title(); ?&gt;&quot; \/&gt;\n        &amp;lt;meta property=&quot;og:description&quot; content=&quot;&amp;lt;?php echo get_the_excerpt(); ?&gt;&quot; \/&gt;\n        &amp;lt;meta property=&quot;og:image&quot; content=&quot;&amp;lt;?php echo get_the_post_thumbnail_url(); ?&gt;&quot; \/&gt;\n        &amp;lt;meta property=&quot;og:url&quot; content=&quot;&amp;lt;?php the_permalink(); ?&gt;&quot; \/&gt;\n        &amp;lt;meta property=&quot;og:type&quot; content=&quot;article&quot; \/&gt;\n        &amp;lt;?php\n    }\n});\n<\/pre><\/div>\n\n\n<p><br><\/p>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You might already be a lot more familiar with how the Featured Image works for The Events Calendar than you know. That&#8217;s because it&#8217;s built on top of the same Featured Image functionality that comes standard with WordPress. In this post, we&#8217;re going to dive into the concept of Featured Images a little deeper. We&#8217;ll&#8230;<\/p>\n","protected":false},"author":5,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[130],"tags":[113,115,23],"stellar-product-taxonomy":[161],"class_list":["post-1896468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced-post-manager","tag-block-editor","tag-classic-editor","tag-css","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":130,"label":"Managing Events"}],"post_tag":[{"value":113,"label":"block editor"},{"value":115,"label":"Classic editor"},{"value":23,"label":"CSS"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Leah","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/leahk\/"},"comment_info":0,"category_info":[{"term_id":130,"name":"Managing Events","slug":"advanced-post-manager","term_group":0,"term_taxonomy_id":130,"taxonomy":"category","description":"","parent":61,"count":19,"filter":"raw","term_order":"0","cat_ID":130,"category_count":19,"category_description":"","cat_name":"Managing Events","category_nicename":"advanced-post-manager","category_parent":61}],"tag_info":[{"term_id":113,"name":"block editor","slug":"block-editor","term_group":0,"term_taxonomy_id":113,"taxonomy":"post_tag","description":"","parent":27,"count":9,"filter":"raw","term_order":"0"},{"term_id":115,"name":"Classic editor","slug":"classic-editor","term_group":0,"term_taxonomy_id":115,"taxonomy":"post_tag","description":"","parent":27,"count":11,"filter":"raw","term_order":"0"},{"term_id":23,"name":"CSS","slug":"css","term_group":0,"term_taxonomy_id":23,"taxonomy":"post_tag","description":"","parent":20,"count":10,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896468"}],"version-history":[{"count":4,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896468\/revisions"}],"predecessor-version":[{"id":1969888,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896468\/revisions\/1969888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896468"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}