我有注册自定义分类法的代码。
function themename_custom_taxonomies() {
// Coaching Method
$coach_method = array(
\'name\' => _x( \'Nieruchomość\', \'taxonomy general name\' ),
\'singular_name\' => _x( \'Nieruchomość\', \'taxonomy singular name\' ),
\'search_items\' => __( \'Szukaj nieruchomości\' ),
\'all_items\' => __( \'Wszystkie nieruchomości\' ),
\'most_used_items\' => null,
\'parent_item\' => null,
\'parent_item_colon\' => null,
\'edit_item\' => __( \'Edytuj\' ),
\'update_item\' => __( \'Zapisz\' ),
\'add_new_item\' => __( \'Dodaj nieruchomość\' ),
\'new_item_name\' => __( \'Nowa nieruchomość\' ),
\'menu_name\' => __( \'Nieruchomości\' ),
);
$args = array(
\'hierarchical\' => true,
\'labels\' => $coach_method,
\'show_ui\' => true,
\'query_var\' => true,
\'rewrite\' => array(\'slug\' => \'listings/?_prop=\', \'with_front\' => false)
);
register_taxonomy( \'nieruchomosc\', array( \'nieruchomosc\', \'ogloszenia\' ), $args );
}
此时,我的分类permalinks看起来:
https://example.com/listings/?_prop=/term-slug/
如何更改(没有斜杠):
https://example.com/listings/?_prop=term-slug
提前感谢您的帮助。