{"id":1967277,"date":"2025-10-20T13:12:27","date_gmt":"2025-10-20T17:12:27","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1967277"},"modified":"2025-10-22T16:06:46","modified_gmt":"2025-10-22T20:06:46","slug":"change-the-default-venue-slug-in-the-events-calendar","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/change-the-default-venue-slug-in-the-events-calendar\/","title":{"rendered":"Change the Default Venue Slug in The Events Calendar"},"content":{"rendered":"\n<p>By default, The Events Calendar uses the slug <code>\/venue<\/code> for all single Venue pages. For example, a single venue URL might look like <code>yourdomain.com\/venue\/the-city-hall\/<\/code>. If you want to change this URL base to something else\u2014like <code>\/location<\/code> or <code>\/space<\/code>\u2014you can do so with a simple code snippet.<\/p>\n\n\n\n<p>This is a great approach for customizing the permalinks on your site to better match your branding or terminology.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-using-a-code-snippet\">Using a Code Snippet<\/h3>\n\n\n\n<p>The following code uses the <code>tribe_events_register_venue_type_args<\/code> filter, which allows you to modify the arguments used when registering the Venues post type, including its rewrite slug.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_register_venue_type_args&#039;, function( $args ) {\n    $args&#x5B;&#039;rewrite&#039;]&#x5B;&#039;slug&#039;] = &#039;location&#039;; \/\/ Change &#039;location&#039; to your preferred slug\n    return $args;\n} );\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-to-use-the-code\">How to Use the Code<\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Add the snippet<\/strong> to your site&#8217;s <strong><code>functions.php<\/code><\/strong> file (recommended only if using a child theme) or use a code snippet plugin.<\/li>\n\n\n\n<li><strong>Replace<\/strong> the word <strong><code>location<\/code><\/strong> on line 2 with your desired slug (e.g., <code>space<\/code>, <code>place<\/code>, or <code>site<\/code>).<\/li>\n\n\n\n<li><strong>Crucially, flush your permalinks<\/strong> after adding or modifying the snippet. You must do this for the change to take effect:\n<ul class=\"wp-block-list\">\n<li>Navigate to <strong>Settings \u2192 Permalinks<\/strong> in your WordPress dashboard.<\/li>\n\n\n\n<li>Simply click the <strong>Save Changes<\/strong> button (you don&#8217;t need to change any settings).<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>After following these steps, your new Venue URLs will use the custom slug, for example: <code>yourdomain.com\/location\/the-city-hall\/<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-flushing-permalinks\">Flushing Permalinks<\/h3>\n\n\n\n<p>Whenever you change a rewrite rule (like a slug), WordPress needs to regenerate its internal structure of URLs. If you skip the step of visiting the <strong>Settings \u2192 Permalinks<\/strong> page and clicking <strong>Save Changes<\/strong>, your venue pages may result in <strong>404 errors<\/strong>. Always flush permalinks after changing a slug.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, The Events Calendar uses the slug \/venue for all single Venue pages. For example, a single venue URL might look like yourdomain.com\/venue\/the-city-hall\/. If you want to change this URL base to something else\u2014like \/location or \/space\u2014you can do so with a simple code snippet. This is a great approach for customizing the permalinks&#8230;<\/p>\n","protected":false},"author":82,"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,59],"tags":[],"stellar-product-taxonomy":[],"class_list":["post-1967277","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-php-function-snippets"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":59,"label":"PHP Functions &amp; Snippets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Collins Kiprono","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/collins\/"},"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":157,"filter":"raw","term_order":"0","cat_ID":24,"category_count":157,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0},{"term_id":59,"name":"PHP Functions &amp; Snippets","slug":"php-function-snippets","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":127,"filter":"raw","term_order":"0","cat_ID":59,"category_count":127,"category_description":"","cat_name":"PHP Functions &amp; Snippets","category_nicename":"php-function-snippets","category_parent":24}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967277","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\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1967277"}],"version-history":[{"count":2,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967277\/revisions"}],"predecessor-version":[{"id":1967279,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967277\/revisions\/1967279"}],"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=1967277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1967277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1967277"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1967277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}