Free Directory, Listing & Classifieds WordPress Plugin Support General HivePress slug – account , submit_listing and respective descending pages

slug – account , submit_listing and respective descending pages

  • Author
    Posts
  • ADr

    Hi,
    I’ve try to use this https://hivepress.io/support/topic/reviews-without-reg-vendor-block/#post-767 and https://hivepress.io/support/topic/listing_category-slug-rewrite-stopped-working-after-update/#post-2210, but it didn’t work for account/settings and account/listing.

    How can I change the slugs from account , submit_listing and respective descending pages.

    Thanks.

    ihordeveloper

    You can do this via HivePress API, here’s an example:

    add_filter(
    	'hivepress/v1/routes',
    	function( $routes ) {
    		$routes['listing_submit_page']['path'] = '/custom-slug';
    
    		return $routes;
    	}
    );
    ADr

    But how? Where do I use this code?
    I did not understand.

    ihordeveloper

    You can add it using this plugin https://wordpress.org/plugins/code-snippets/ or if you use a child theme you can add code snippets to its functions.php file. The example above changes the “submit-listing” slug (refresh permalinks in Settings/Permalinks after you add it).

    ADr

    ihor I did what you said, and my site crash.
    I insert on functions,php file.
    Going to try the plugin.

    ADr

    Use the plugin as well, and did crash the specific page.
    all content disapear.

    ihordeveloper

    Please make sure that you copied and added it correctly, I tried adding it locally and it works without any issues.

    skywalker

    Similar issue here, I inserted the code with the Snippets plugin and there was a problem. In addition to the page not working, even now removing the code the content has disappeared.

    ADr

    I did add as you post.

    There is no other way to do that?

    ihordeveloper

    This is strange, I added it via the same Code Snippets plugin, refreshed permalinks and it changed the “Add Listing” button URL to “/custom-slug”. It should look like this https://prnt.sc/uldd0f This is the only way to change slugs for static pages (slugs for dynamic pages can be edited in WordPress/Pages section).

    skywalker

    fixed here! it worked when I saved the permalink page (even if no changes were made)

    skywalker

    how change slug for:
    /account/listings/
    /submit-listing -ALREADY CHANGED- I don’t know how to change after the slash –>> /category/
    /submit-listing – SAME HERE –>> /details/

    ADr

    Hi Ihor, TKS for you support, It’s working now. I think I’ve miss saving permalink page. Tks for the reminder skywalker.

    However as I said, I was not able to change the slugs after the second bar ( / ). Like:

    site.com/conta/settings – I’m changing to portuguese.
    or
    site.com/cadastrar/category

    Witch code I can use do change those?

    ADr

    to account I wan’t able to change too.

    ihordeveloper

    If you change some slug then all subpages will also be changed (/submit-listing/something), I’ve just checked and this snippet also changes /submit-listing/details to /custom-slug/details. You can change slug for any static page in the same way using it’s name, e.g. it’s “listings_edit_page” for /account/listings.

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.