{"id":1957574,"date":"2022-09-06T03:39:06","date_gmt":"2022-09-06T07:39:06","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?post_type=post&#038;p=1952788"},"modified":"2023-06-19T06:34:23","modified_gmt":"2023-06-19T10:34:23","slug":"how-to-change-the-series-slug","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/how-to-change-the-series-slug\/","title":{"rendered":"How to Change the Series Slug"},"content":{"rendered":"\n<p>By default, the URL slug for a Series is simply <em>series, <\/em>e.g. <code>your site.com\/series\/series-name<\/code>. This snippet allows you to change the global slug to match your needs. For example, a theater might want to change the slug to <em>play <\/em>so that they can show all the times (events) for a particular play on the Series page with a URL like <code>example.com\/play\/my-fair-lady<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-snippet\">The snippet<\/h2>\n\n\n\n<p>Simply place the following snippet in your theme&#8217;s functions.php file and replace <code>new-series-slug<\/code> with whatever you&#8217;d like the slug to be.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\t\tadd_filter( &#039;tribe_events_register_series_type_args&#039;,\n\t\t\tfunction ( $args ) {\n\t\t\t\t$args&#x5B;&#039;rewrite&#039;]         = isset( $args&#x5B;&#039;rewrite&#039;] ) ? $args&#x5B;&#039;rewrite&#039;] : &#x5B;];\n\t\t\t\t$args&#x5B;&#039;rewrite&#039;]&#x5B;&#039;slug&#039;] = &#039;new-series-slug&#039;;\n\n\t\t\t\treturn $args;\n\t\t\t}\n\t\t);\n<\/pre><\/div>\n\n\n<p>After applying the PHP snippet, it&#8217;s crucial to flush your WordPress permalinks to avoid potential navigation issues. <\/p>\n\n\n\n<p>You can do this by going to your WordPress dashboard (wp-admin) > Settings > Permalinks, and clicking the &#8216;Save Changes&#8217; button. This action flushes the permalinks, ensuring it&#8217;ll be reinterpreted and that your changes are being applied.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, the URL slug for a Series is simply series, e.g. your site.com\/series\/series-name. This snippet allows you to change the global slug to match your needs. For example, a theater might want to change the slug to play so that they can show all the times (events) for a particular play on the Series&#8230;<\/p>\n","protected":false},"author":31,"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":[24,59,67,79],"tags":[25,66],"stellar-product-taxonomy":[],"class_list":["post-1957574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-customizing-resources","category-recurring-events","category-snippets","tag-customizations","tag-recurring"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":59,"label":"PHP &amp; Functions"},{"value":67,"label":"Recurring Events"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":66,"label":"recurring"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Guga Alves","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/gugatheeventscalendar-com\/"},"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":59,"name":"PHP &amp; Functions","slug":"customizing-resources","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":101,"filter":"raw","term_order":"0","cat_ID":59,"category_count":101,"category_description":"","cat_name":"PHP &amp; Functions","category_nicename":"customizing-resources","category_parent":24},{"term_id":67,"name":"Recurring Events","slug":"recurring-events","term_group":0,"term_taxonomy_id":67,"taxonomy":"category","description":"","parent":61,"count":11,"filter":"raw","term_order":"0","cat_ID":67,"category_count":11,"category_description":"","cat_name":"Recurring Events","category_nicename":"recurring-events","category_parent":61},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":177,"filter":"raw","term_order":"0"},{"term_id":66,"name":"recurring","slug":"recurring","term_group":0,"term_taxonomy_id":66,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1957574","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\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1957574"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1957574\/revisions"}],"predecessor-version":[{"id":1957724,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1957574\/revisions\/1957724"}],"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=1957574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1957574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1957574"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1957574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}