{"id":21248,"date":"2015-12-23T10:25:51","date_gmt":"2015-12-23T10:25:51","guid":{"rendered":"https:\/\/docs.wpgeodirectory.com\/?p=21248"},"modified":"2015-12-23T10:25:51","modified_gmt":"2015-12-23T10:25:51","slug":"franchise-addon-filters","status":"publish","type":"post","link":"https:\/\/wpgeodirectory.com\/docs\/franchise-addon-filters\/","title":{"rendered":"Franchise addon filters"},"content":{"rendered":"<p>You can use these filters in your child theme&#8217;s functions.php file.<\/p>\n<h4>Change the tab<\/h4>\n<ul>\n<li>This code will change the title of the <em><strong>More Franchises<\/strong><\/em> tab: change <em><strong>More Branches<\/strong><\/em> to the text of your choice.<\/li>\n<li>You can change <em><strong>gd_place<\/strong><\/em> to use the code for another custom post type.<\/li>\n<\/ul>\n<p>[php]<br \/>\nfunction geodir_franchise_change_franchises_tab_text($text, $post_type) {<br \/>\nif ($post_type == &#8216;gd_place&#8217;) {<br \/>\n$text = __(&#8216;More Branches&#8217;, &#8216;geodir-franchise&#8217;);<br \/>\n}<br \/>\nreturn $text;<br \/>\n}<br \/>\nadd_filter( &#8216;geodir_franchise_franchises_tab_text&#8217;, &#8216;geodir_franchise_change_franchises_tab_text&#8217;, 10, 2 );<br \/>\n[\/php]<\/p>\n<h4>Change the\u00a0link to all franchise listings<\/h4>\n<ul>\n<li>This code will change the title of the <em><strong>View all franchises<\/strong><\/em>\u00a0link: change <em><strong>View all branches<\/strong><\/em>\u00a0to the text of your choice.<\/li>\n<li>You can change <em><strong>gd_place<\/strong><\/em> to use the code for another custom post type.<\/li>\n<\/ul>\n<p>[php]<br \/>\nfunction geodir_franchise_change_all_link_text($text, $post_type) {<br \/>\nif ($post_type == &#8216;gd_place&#8217;) {<br \/>\n$text = __(&#8216;View all branches&#8217;, &#8216;geodir-franchise&#8217;);<br \/>\n}<br \/>\nreturn $text;<br \/>\n}<br \/>\nadd_filter( &#8216;geodir_franchise_all_franchises_link_text&#8217;, &#8216;geodir_franchise_change_all_link_text&#8217;, 10, 2 );<br \/>\n[\/php]<\/p>\n<h4>Change the\u00a0Add franchise link<\/h4>\n<ul>\n<li>This code will change the title of the <em><strong>Add Franchise<\/strong><\/em>\u00a0link: change <em><strong>Add Branch<\/strong><\/em>\u00a0to the text of your choice.<\/li>\n<li>You can change <em><strong>gd_place<\/strong><\/em> to use the code for another custom post type.<\/li>\n<\/ul>\n<p>[php]<br \/>\nfunction geodir_franchise_change_add_link_text($text, $post_type) {<br \/>\nif ($post_type == &#8216;gd_place&#8217;) {<br \/>\n$text = __(&#8216;Add Branch&#8217;, &#8216;geodir-franchise&#8217;);<br \/>\n}<br \/>\nreturn $text;<br \/>\n}<br \/>\nadd_filter( &#8216;geodir_franchise_add_franchise_link_text&#8217;, &#8216;geodir_franchise_change_add_link_text&#8217;, 10, 2 );<br \/>\n[\/php]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use these filters in your child theme&#8217;s functions.php file. Change the tab This code will change the title of the More Franchises tab: change More Branches to the text of your choice. You can change gd_place to use the code for another custom post type. [php] function geodir_franchise_change_franchises_tab_text($text, $post_type) { if ($post_type == &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpgeodirectory.com\/docs\/franchise-addon-filters\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Franchise addon filters&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1676,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[159],"tags":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/21248"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/users\/1676"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/comments?post=21248"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/21248\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/media?parent=21248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/categories?post=21248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/tags?post=21248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}