Join our new community forum for support & discussion

Join Now

Home Support Extensions Marketplace How do i change vendor and listing slug safely?

How do i change vendor and listing slug safely?

  • Author
    Posts
  • MeetHub

    Hi, i’ve used this code here:

    add_filter(
      'hivepress/v1/post_types',
      function ($args) {
        $args['listing']['rewrite']['slug'] = 'meet';
      }
    );
    add_filter(
      'hivepress/v1/post_types',
      function ($args) {
        $args['vendor']['rewrite']['slug'] = 'especialista';
      }
    );
    

    But the post types, vendor and listings, disappeared and i couldn’t access the pages already made.

    ihor developer

    Please try using this one instead, and refresh permalinks in Settings/Permalinks section after you add it:

    add_filter(
    	'hivepress/v1/post_types',
    	function( $post_types ) {
    		$post_types['listing']['rewrite']['slug'] = 'meet';
                    $post_types['vendor']['rewrite']['slug'] = 'especialista';
    
    		return $post_types;
    	},
            1000
    );
    Carlos Magno

    I added the snnipet with the code snippets plugin. The url has been changed but the ads are not showing. The result is “Page not found”

    Bemay1

    You need to refresh the permalinks:
    – Settings;
    – Permalinks;
    – Just save it;

    ihor developer

    Thanks @Bemay1

    Carlos Magno

    Thanks @Bemay1 and @ihor. I did exactly that and it didn’t work. I recorded the video below for you to see. Please help me to resolve it.
    https://vimeo.com/680213217/1d324b16b2

    Carlos Magno

    Solved @Bemay1e @ihor. I needed to disable the “Custom Post Type UI” plugin as well.

    But how to change the slug on the link when we click on the ad category. I would like to change “https://goiana.net/listing-category/carros/” to “https://goiana.net/categoria-anuncio/carros/”
    https://vimeo.com/680219464/6648a18be6

    ihor developer

    Please try using the code snippet suggested here https://hivepress.io/support/topic/listing_category-slug-rewrite-stopped-working-after-update/#post-2210 and refresh permalinks afterwards.

Viewing 8 posts - 1 through 8 (of 8 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.