• Josh Carr

    (@piano08man)


    Since the introduction of WooCommerce, I’ve been looking for any easy way to keep a consistent permalink structure for my clients. They all want store/category/subcategory/product in a nice, clean format that progressively builds as you click through the site. They don’t want to see the URL structure change… just more added to it.

    I’ve never seen anyone post an easy solution to this so I thought I’d share what I came up with tonight. This plugin is they key to clean URLs:

    Custom Permalinks by the developer of audiobus. Look him up.

    You can’t just activate it and be happy, there’s a little more work to do (not too much). Here’s the structure I’ve been trying to enable for months:

    http://domain.com/products/category/subcategory/product

    To achieve this, I created a page called products and set the shop base page to the products page — WooCommerce > Settings > Pages. I then went to the WordPress permalinks settings and changed the products category base to “products” — Settings > Permalinks. Also also changed the product permalink base to default.

    After getting that set up, my product categories work exactly as they should each click adds the next portion of the URL, products/category/subcategory/

    All I have to do to tack the product on the end of that string by using the custom permalink field for each product. Each product will default to a non-pretty permalink so your only responsibility is to manually make it pretty. Add your custom hierarchy to each product and make everything awesome.

    Disclaimer: I realize that WooCommerce hasn’t added this functionality because it can supposedly cause conflicts (read this). I’ve tested this strategy on WordPress 3.5.1 and WooCommerce 2.0.8. I have not tested this on older versions of WP or WC. Your mileage may vary. Just try to be sure that you aren’t using a base URL structure that could conflict with the default wordpress configuration.

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter Josh Carr

    (@piano08man)

    One more thing — using Yoast’s WordPress SEO plugin, you can disable the default WooThemes Breadcrumbs, enable the Yoast breadcrumbs and set the following settings to get the same layer in your breadcrumbs as you do in the URL:

    Taxonomy to show in breadcrumbs for products: product category
    Post type archive to show in breadcrumbs for product category: products

    My breadcrumbs follow the URL structure exactly with those settings. Of course, you do have to add Yoast’s code to your template file(s) to get this working.

    Hi Josh!

    I’ve tried the last 5 days over 20 hours to fix the same problem like you had. I experimented with the permalinks, changed, tried..cried ;)..but also ended everytime up with a 404. All parts of the links worked fine with different custom tags like /products/%product_cat% for example, but the last part, the product-page, is the problem…a BIG problem. I’ve tried ca. 30 different woocommerce-permalinks-combinations and ended everytime up with a broken product-page.

    I’ve tried your solution and it works, but in the meantime we have over 150 products in the shop and there are coming more..that would be a horror to change the existing links and to administrate the whole thing in the future.

    Also 10 months after your post nowhere can a 100%-solution be found.
    A shame for WooCommerce !!

    Have you found a better solution in the meantime?
    I have to grab a coffee now..please let me know!
    Thank you πŸ˜‰

    Greetz,
    Jay

    Thread Starter Josh Carr

    (@piano08man)

    Hi Jay,

    Unfortunately that is still the only solution I’ve found. I would add that I’m also using a plugin called “Custom Post Type Editor” to rewrite “products” to “store” because I sell labor items in addition to products.

    During my initial investigation, Woo told me that they would never include this feature because it could break things for people who don’t know what they’re doing. They are correct… it absolutely would. I know what I’m doing, so I figured out this solution and couldn’t be happier.

    Going back to modify 150+ products wouldn’t be fun, but something that an afternoon would fix. Don’t forget to do redirects for all of the old URLs if you decide to pull the trigger. “Redirection” is a great plugin for that and 404 monitoring. I love it.

    I’m surprised most people don’t complain about this. This URL structure is certainly the best for SEO, especially when you get the breadcrumbs to line up correctly.

    Good luck!

    Hi Josh,

    this crappy thing..*I’m so tired ;)*
    Thank you for your fast answer!
    I know “Custom Post Type Editor”, but you created the tag ‘products’ by yourself..so why are you rewriting the tag to ‘store’?
    How are you doing that with CPTE. Didn’t know before that you also can change url-tags with this plugin;)

    Are you sure, that I would have to redirect the old url’s to the new ones?
    I’ve tested the whole thing sucessfully with one product; and when I call the old product-url, he already redirects to the new one ??? πŸ™‚
    Strange. So you would suggest in SEO’s-name πŸ™‚ to install the suggested ‘Redirection’-Plugin?
    I know that it’s the best solution for SEO, but not the best solution for an Administrator..damnnnn it^^
    In the end I will change 150+. For sure πŸ˜‰

    THANK YOU !!

    Best Regards,
    Jay

    Thread Starter Josh Carr

    (@piano08man)

    I didn’t create products – woothemes’ post type is products. When viewing the products page it would always say “products” in the page title because it’s generated by the taxonomy. Drove me nuts. That’s the main reason I added that plugin.

    WordPress does have smart redirection, if you don’t have to do the redirects, that’s great! I was suggesting it as a “just in case” scenario. If it works already, don’t worry about it.

    Redirection is a good way to monitor 404s in addition to adding redirects as necessary. It’s a must-have for every WordPress install (IMHO).

    Ahh yes..you are right, now I know what you were talking about.
    Haha..my system is rewriting the links to the German version of ‘products’ ../Produkt/…

    Is it not possible to global-rewrite all the URL’s the hard-way over a htaccess or someway? πŸ˜‰ Grab the crappy /Produkt/* and push it hard on the right way to SEO-heaven xD

    Woothemes is making so much money with all their plugins and extensions.
    They would make definitely a lot of cash with a plugin to activate the correct links. Is it right, that they had the auto-permalinks-option in an earlier version of WooCommerce?
    [EDIT: “Woocommerce – Settings > Pages Tab > Permalinks > Product base page > Prepend product permalinks with product category” This option isn’t their anymore? Why? ]

    Thread Starter Josh Carr

    (@piano08man)

    They did have an auto permalinks button in a previous version, yes… but it never worked the way I expected it to work. It definitely didn’t do what this method does.

    I’m really asking myself, why I’ve build such a nice url structure, when
    the url’s are gonna break through woocommerce at the end πŸ˜‰
    /produkte… /products This is so silly xD
    And this happens in one of the biggest E-Commerce- extensions available for WordPress. No comment.

    Hi Josh,

    I know this post is too old but I really feel like I had to thanks you a million for this.
    I’ve been looking for around a week to fix the URLs problem since woocommerce and wordpress permalinks are not native “seo like”.

    Thank you so much.

    PS : Can you explain where to go in Yoast to active breadcrumbs I can’t find out !

    Alex

    Thread Starter Josh Carr

    (@piano08man)

    It’s in the Internal links section of Yoast’s WordPress SEO plugin. Replace domain.com in the link below with your website address and it should take you right to it.

    domain.com/wp-admin/admin.php?page=wpseo_internal-links

    There are usage instructions at the bottom of that page.

    Thanks.

    Ok all, I did a complete new install.

    Reading the topics this is actually the same what I did: http://wpml.org/forums/topic/404-errors-for-woocommerce-products-on-wp-multisite/.

    PRODUCT PAGE = WORKING

    1
    http://www.pipservies.net/pip-studio-outlet/high-tea/pip-servies-floral-kop-en-schotel-cappuccino-khaki/
    CATEGORY PAGE = WORKING

    1
    http://www.pipservies.net/pip-studio-outlet/high-tea/
    SHOP PAGE = WORKING

    1
    http://www.pipservies.net/pip-studio-outlet/
    The only problem here is the category page, it works with that URL, but the canonical, breadcrumbs and category link still show the ‘wrong url’, like this:

    CATEGORY PAGE = WORKING

    1
    http://www.pipservies.net/product-categorie/high-tea/
    How can we change this?

    I know it is possible because I had it working for 3 days!

    Kind regards,

    Willem

    I followed your steps and I am able to reach domain.com/products/category/sub-category but after that no joy..

    http://www.takeaclick.com/products/amazon/kindle/

    When you visit the link you can see the kindle product listed there but when you click on it.. page not found.

    Latest version of all plugins.. is that the trouble?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Rather than posting to a 10 month old topic can you instead start your own topics?

    http://wordpress.org/support/plugin/woocommerce#postform

    Both WordPress and this plugin have changed dramatically in that 10 months.

    Thread Starter Josh Carr

    (@piano08man)

    Jan – I’m still monitoring this discussion because none of this has even been (nor will it ever be) implemented properly for SEO.

    neol56 & Willem-Siebe – make sure that you have your product permalinks set to the default in Settings > Permalinks. The rewrites listed above won’t work properly without that setting.

    Hope that helps.

    @jan – I already posted but got a faster reply here. Since Josh is responding and seems to be the only guy who got it working, I am posting again.

    @josh – I took some screenshots of my settings of woocommerce permalinks, product page settings and product page pretty permalinks. Could you check and see what I am doing wrong?

    https://dl.dropboxusercontent.com/u/50923510/woocommerce%20products%20page.PNG

    https://dl.dropboxusercontent.com/u/50923510/woocommerce%20permalinks%20structure.PNG

    https://dl.dropboxusercontent.com/u/50923510/woocomerce%20post%20pretty%20permalink%20structure.PNG

    I know I am doing something wrong since you got it working. Here is the category page after which product page does not work.

    http://www.takeaclick.com/products/amazon/kindle/

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WooCommerce Easy Permalink Solution’ is closed to new replies.