Home Support General HivePress Changing vendor profile link

Changing vendor profile link

  • Author
    Posts
  • sagittaria

    By default, the vendor profile address is sitename.com/vendor/name. How can I change “vendor” to a different word?

    ihor developer

    Please try using this code snippet and refresh permalinks after you add it:

    add_filter(
    	'hivepress/v1/post_types',
    	function( $post_types ) {
    		$post_types['vendor']['rewrite']['slug'] = 'custom-slug-here';
    
    		return $post_types;
    	}
    );
    sagittaria

    Thanks. It works, the word changes, but when you enter vendor’s profile … “nothing’s found” 🙁 It doesn’t matter, I managed with the permalink manager plugin.

    But I have another question: using custom css, I hid it in 2 filters, that appeared in footer of .hp-vendors .hp-grid__item in vendor’s catalog:

    / * Division * /
    .hp-vendor .hp-vendor__attribute – settlement-method {
    display: none;
    }

    / * Division * /
    .hp-vendor .hp-vendor__attribute – additional-services {
    display: none;)

    Unfortunately when you use a search engine, these text boxes reappear in .hp-vendors that were found. Can I hide them somehow?

    ihor developer

    You don’t have to install any permalink plugins, please try just refreshing permalinks after you add this code snippet (because WordPress still tries to resolve old vendor URLs).

    If you want to hide some attribute simply edit it and change its Display Areas, CSS customizations are not required (in this case you can simply remove the “Block (secondary)” area).

    sagittaria

    How can I refresh permalinks?

    ihor developer

    By simply re-saving them in Settings/Permalinks section.

    sagittaria

    Thank you very, very much! It works!

    Can you tell me next thing: how can I change “Listings from <vendor’s name>” to custom title?

    And how can I change “Answer listing” in listing’d button to custom CTA?

    ihor developer

    It’s possible to change any static text using Loco Translate plugin, this is the easiest way without any code changes https://wordpress.org/plugins/loco-translate/

    sagittaria

    I did it! Absolutely GREAT! One more time: thank you soooo much!

    Could you tell me: can I do sth that it would be possible to send mail without signing in?

    And next thing: I would like to have 1 sentence under vendor’s name in vendors catalog. You know: his/her motto or claim, sth like this. Is it possible?

    ihor developer

    Sorry, but both changes would require code customizations.

    sagittaria

    OK, I understand. Nevertheless, you’ve helped me a lot. Thank you very much!

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Changing vendor profile link’ is closed to new replies.