Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paolo

    (@paoltaia)

    Hi Paul,

    honestly, I don’t know any easy way to do that. It definitely requires some custom code.

    I asked our dev’s team to see if one of them has a quick solution for this.

    They’ll let you know asap.

    Thanks for your patience,

    Paolo

    Hi Paul,

    Try following PHP snippet to use /resources/ as a parent to /places/ directory slug.

    function gd_snippet_option_post_types( $value, $key, $default ) {
    	$post_type 	= 'gd_place'; // Post type
    	$top_level_item = 'resources'; // Top level item
    
    	if ( ! empty( $value[ $post_type ] ) ) {
    		$value[ $post_type ]['has_archive'] 	= $top_level_item . '/' . $value[ $post_type ]['rewrite']['slug'];
    		$value[ $post_type ]['rewrite']['slug'] = $top_level_item . '/' . $value[ $post_type ]['rewrite']['slug'];
    	}
    
    	return $value;
    }
    add_filter( 'geodir_get_option_post_types', 'gd_snippet_option_post_types', 21, 3 );

    Regards,

    Kiran

    Thread Starter Paul Watson

    (@haufers)

    Amazing, thanks for that it worked a treat. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change URL Structure’ is closed to new replies.