{"id":1959123,"date":"2024-01-19T14:32:49","date_gmt":"2024-01-19T19:32:49","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1959123"},"modified":"2024-06-13T07:35:40","modified_gmt":"2024-06-13T11:35:40","slug":"display-additional-fields-next-to-the-title-in-the-list-view","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/display-additional-fields-next-to-the-title-in-the-list-view\/","title":{"rendered":"Display Additional Fields Next to the Title in the List View"},"content":{"rendered":"\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/pXlcTUXuNkI?si=sTJ05K9LBHLgPClT\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n\n\n\n<p>If you want to display an additional field in the list view, first, make a copy of this file:<br>\/wp-content\/plugins\/the-events-calendar\/src\/views\/v2\/list\/event\/title.php<\/p>\n\n\n\n<p>Create the subdirectories in your child theme and add the file here.<br>\/wp-content\/[your-theme]\/tribe\/events\/v2\/list\/event\/title.php<\/p>\n\n\n\n<p>From there, you will need to call the additional field. Replace or adjust the contents of the file with the following code snippet, which will call the additional field &#8220;Artist&#8221; and display it next to the title in the list view.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;h3 class=&quot;tribe-events-calendar-list__event-title tribe-common-h6 tribe-common-h4--min-medium&quot;&gt;\n\t&lt;a\n\t\t\thref=&quot;&lt;?php echo esc_url( $event-&gt;permalink ); ?&gt;&quot;\n\t\t\ttitle=&quot;&lt;?php echo esc_attr( $event-&gt;title ); ?&gt;&quot;\n\t\t\trel=&quot;bookmark&quot;\n\t\t\tclass=&quot;tribe-events-calendar-list__event-title-link tribe-common-anchor-thin&quot;\n\t&gt;\n\t\t&lt;?php\n\t\t\/\/ phpcs:ignore\n\t\techo $event-&gt;title;\n\t\t\n\t\t\/\/ Fetch all custom fields and their values of the event.\n\t\t$fields = tribe_get_custom_fields( $event-&gt;ID );\n\n\t\t\/\/ If there is an &quot;Artist&quot;, print it.\n\t\tif ( ! empty( $fields&#x5B; &#039;Artists&#039; ] ) ) :\n\t\t\techo &quot; &quot; . esc_html( $fields&#x5B; &#039;Artists&#039; ] );\n\t\tendif;\n\t\t?&gt;\n\t&lt;\/a&gt;\n&lt;\/h3&gt;\n<\/pre><\/div>\n\n\n<p>Here&#8217;s an example of how it looks. In the block editor, we have added an Additional Field named \u201cArtist\u201d. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"438\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.53.00-PM.png\" alt=\"What the additional field looks like in the list view\" class=\"wp-image-1959127\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.53.00-PM.png 968w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.53.00-PM-300x136.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.53.00-PM-768x348.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/figure>\n\n\n\n<p>After adding the template override, the value of the \u201cArtist\u201d field will show next to the title.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1636\" height=\"532\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.54.47-PM.png\" alt=\"The additional field's value next to the title in the list view\" class=\"wp-image-1959128\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.54.47-PM.png 1636w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.54.47-PM-300x98.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.54.47-PM-1024x333.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.54.47-PM-768x250.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/01\/Screen-Shot-2024-01-11-at-4.54.47-PM-1536x499.png 1536w\" sizes=\"auto, (max-width: 1636px) 100vw, 1636px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you want to display an additional field in the list view, first, make a copy of this file:\/wp-content\/plugins\/the-events-calendar\/src\/views\/v2\/list\/event\/title.php Create the subdirectories in your child theme and add the file here.\/wp-content\/[your-theme]\/tribe\/events\/v2\/list\/event\/title.php From there, you will need to call the additional field. Replace or adjust the contents of the file with the following code snippet, which&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"open","ping_status":"open","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":[24,84],"tags":[214,215,212],"stellar-product-taxonomy":[],"class_list":["post-1959123","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-theming-overview","tag-fields","tag-list-view","tag-snippets"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":84,"label":"Templating &amp; Layout"}],"post_tag":[{"value":214,"label":"fields"},{"value":215,"label":"list view"},{"value":212,"label":"snippets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizations","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":110,"filter":"raw","term_order":"0","cat_ID":24,"category_count":110,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0},{"term_id":84,"name":"Templating &amp; Layout","slug":"theming-overview","term_group":0,"term_taxonomy_id":84,"taxonomy":"category","description":"","parent":24,"count":59,"filter":"raw","term_order":"0","cat_ID":84,"category_count":59,"category_description":"","cat_name":"Templating &amp; Layout","category_nicename":"theming-overview","category_parent":24}],"tag_info":[{"term_id":214,"name":"fields","slug":"fields","term_group":0,"term_taxonomy_id":214,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","term_order":"0"},{"term_id":215,"name":"list view","slug":"list-view","term_group":0,"term_taxonomy_id":215,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"0"},{"term_id":212,"name":"snippets","slug":"snippets","term_group":0,"term_taxonomy_id":212,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1959123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1959123"}],"version-history":[{"count":14,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1959123\/revisions"}],"predecessor-version":[{"id":1961025,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1959123\/revisions\/1961025"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1959123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1959123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1959123"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1959123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}