• Resolved thejoshevans

    (@thejoshevans)


    Hi,

    This is a great plugin, I’ve hacked it up a bit for a client’s site but it works great.

    The only problem I’m having is organising a decent link structure. I was able to change the wording of the categories/products permalinks by following some info from another thread however it’s still not perfect.

    I want to set it up so that when you are on a product it reads as:

    http://www.example.com/category-name/product-name

    I can’t seem to find a way of pulling the category name into the link structure though. Any help would be greatly appreciated!

    Cheers

    https://wordpress.org/plugins/wp-catalogue/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter thejoshevans

    (@thejoshevans)

    Anyone know how to change this?

    Plugin Author Maeve Lander

    (@enigmaweb)

    If you’re OK with modifying the plugin code then here’s where to do this:

    In wpc-product.php on line 24 you will see this:

    'rewrite' => array("slug" => "wpcproduct")

    Then on line 126 you will see this:

    'rewrite' => array( 'slug' => 'wpccategories', 'with_front' => false ),

    Replace wpccategories and wpcproduct with your own custom slugs.

    Final step is to go to Settings > Permalinks and resave your permalink structure.

    Hope that helps, and sorry I didn’t see this and reply to your post sooner. 🙂

    Thread Starter thejoshevans

    (@thejoshevans)

    Hi Maeve, thanks for getting back to me!

    I did this when I found it in another thread, but as far as I can tell this will only replace ‘wpccategories’ with another fixed word? Is it possible to have the category name dynamically entered?

    For example, on this page:

    http://www.sedna.lighting/product/led-corn-higbay-e27-e40-lamp/

    I’d like the product part of the link to display the category name so it would read:

    http://www.sedna.lighting/industrial-led-lighting/led-corn-higbay-e27-e40-lamp/

    If you can point me in the right direction that would be great!

    Thanks

    Plugin Author Maeve Lander

    (@enigmaweb)

    I did this when I found it in another thread, but as far as I can tell this will only replace ‘wpccategories’ with another fixed word?

    Correct, it allows you to set your own custom slugs to use, but yes they are the same across all categories.

    Is it possible to have the category name dynamically entered?

    Sorry, it would be possible, but require a lot of custom code work in the plugin to set it up. Its a very good idea though. I will add this on my ToDO list for this plugin and look into getting it done in the future. But for now, sorry, its not a quick mod I can provide instructions for here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Link structure: Cat-name/Prod-name’ is closed to new replies.