Join our new community forum for support & discussion

Join Now

Home Support Extensions Geolocation Region change link

Region change link

  • Author
    Posts
  • Stiffcio

    Hi. I’m setting regions for myself with the new update. I have a question. How do I change the link name to my native language?
    sitename / listing-region / name city /
    sitname / region / name city

    so that instead of listing-region there was something I want to enter.

    e.g. I used this script to change the category:

    add_filter(
    	'hivepress/v1/taxonomies',
    	function( $taxonomies ) {
    		$taxonomies['listing_category']['rewrite']['slug'] = 'kategorie';
    
    		return $taxonomies;
    	}
    );

    but if I change listing_category to listing_region or listing-region doesn’t work: P

    gabetu

    It’s hp_listing_region.

    ihor developer

    Thanks @gabetu

    Stiffcio

    Hi. Ok, I set it like this:

    add_filter(
    	'hivepress/v1/taxonomies',
    	function( $taxonomies ) {
    		$taxonomies['hp_listing_region']['rewrite']['slug'] = 'region';
    
    		return $taxonomies;
    	}
    );

    And it doesn’t work.

    yevhen developer

    Please try this PHP snippet instead. Also, please refresh permalinks after adding this snippet

    add_filter(
    	'hivepress/v1/taxonomies',
    	function( $taxonomies ) {
    		if(isset($taxonomies['listing_region'])){
    			$taxonomies['listing_region']['rewrite']['slug'] = 'region';
    		}
    
    		return $taxonomies;
    	},
    	1000
    );
Viewing 5 posts - 1 through 5 (of 5 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.