Home / Forums / WoodMart support forum / Woocommerce brand URL and brand attribute URL merge
Home › Forums › WoodMart support forum › Woocommerce brand URL and brand attribute URL merge
Woocommerce brand URL and brand attribute URL merge
- This topic has 13 replies, 3 voices, and was last updated 6 years, 11 months ago by
Elise Noromit.
-
AuthorPosts
-
November 15, 2018 at 2:06 pm #89690
magnetParticipantHello,
Is it possible to merge (or any other way) URL addresses of brands that WooCommerce provides and those that come with theme as a brand attributes?
We would like to list products from one brand like this:
https://myshop.sk/znacka/vevaRight now, only way to list brand attribute is like this:
https://myshop.sk/shop/?filter_znacka=vevaNovember 15, 2018 at 3:11 pm #89704
Artem TemosKeymasterHello,
You can add the following code to the functions.php file in the child theme to change brands link structure there
add_filter( 'woodmart_brands_link', function( $link, $brand ){ return get_term_link( $brand->term_id, $brand->taxonomy ); }, 10, 2 );Kind Regards
November 16, 2018 at 3:36 pm #89891
magnetParticipantI added the code, but I don’t know how to change it so I’ll get the expected result – site.com/brand/brand-name. Can you edit the code or help me with understanding how to achieve desired URL?
The result I got with your code: https://myshop.sk/?taxonomy=pa_znacka&term=veva
November 16, 2018 at 3:41 pm #89894
Artem TemosKeymasterYou can change your permalinks structure in Dashboard -> Settings -> Permalinks.
November 16, 2018 at 3:50 pm #89898
magnetParticipantOf course I tried that but doesnt seem to work.
When I access the brand I want to list with url /brand/brand-name/ only thing I get is the PNG logo of the brand.
November 16, 2018 at 8:19 pm #89951
Artem TemosKeymasterSorry, but your problem is not quite clear for us. Please, explain in details for better understanding. And we don’t see your website because of the maintenance mode active.
November 23, 2018 at 3:30 pm #91261
magnetParticipantI disabled maintenance mode, so you can check it out.
We want Google to index the page that has listed all the products from one brand. (for example the link in the private content) Problem is, that the link has parameters in it and Google may have problem with indexing that page.
more in the private content.
November 23, 2018 at 3:33 pm #91263
Artem TemosKeymasterHave you placed the code we sent you to the child theme? Please, send us a screenshot where you placed it.
November 23, 2018 at 3:37 pm #91265
magnetParticipantI tried it before, it wasn´t working as expected. I put it in functions.php again so you can see it.
Attachments:
You must be logged in to view attached files.November 23, 2018 at 3:37 pm #91268
Artem TemosKeymasterPlease, provide us your admin and FTP access so we can check what is wrong.
November 23, 2018 at 3:46 pm #91270
magnetParticipanthere you go.
November 23, 2018 at 3:49 pm #91272
Artem TemosKeymasterTry to turn on “Enable archives” option for the brand attribute in Dashboard -> Products -> Attributes.
November 23, 2018 at 3:57 pm #91274
magnetParticipantGreat, I checked “enable archives” and it seems to be working now.
Thank you.
November 23, 2018 at 5:42 pm #91292
Elise NoromitMemberYou are welcome! If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
The topic ‘Woocommerce brand URL and brand attribute URL merge’ is closed to new replies.
- You must be logged in to create new topics. Login / Register