Franchise addon filters

You can use these filters in your child theme’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.
function geodir_franchise_change_franchises_tab_text($text, $post_type) {
if ($post_type == 'gd_place') {
$text = __('More Branches', 'geodir-franchise');
}
return $text;
}
add_filter( 'geodir_franchise_franchises_tab_text', 'geodir_franchise_change_franchises_tab_text', 10, 2 );

Change the link to all franchise listings

  • This code will change the title of the View all franchises link: change View all branches to the text of your choice.
  • You can change gd_place to use the code for another custom post type.
function geodir_franchise_change_all_link_text($text, $post_type) {
if ($post_type == 'gd_place') {
$text = __('View all branches', 'geodir-franchise');
}
return $text;
}
add_filter( 'geodir_franchise_all_franchises_link_text', 'geodir_franchise_change_all_link_text', 10, 2 );

Change the Add franchise link

  • This code will change the title of the Add Franchise link: change Add Branch to the text of your choice.
  • You can change gd_place to use the code for another custom post type.
function geodir_franchise_change_add_link_text($text, $post_type) {
if ($post_type == 'gd_place') {
$text = __('Add Branch', 'geodir-franchise');
}
return $text;
}
add_filter( 'geodir_franchise_add_franchise_link_text', 'geodir_franchise_change_add_link_text', 10, 2 );