Woocommerce and Essential grid

Hello! I have created a woocommerce Shop page with the Essential grid.

Right now, it works like this: I have a Shop page, with several products in several categories, with the possibility to filter the products, all created with the Essential grid. When I click on the category in filter (for example T-shirts), all T-shirts are shown, and this “CATEGORY PAGE” has the design I created in the Essential grid. However, when I click on the category link on the product item of the Shop page, it sends me to a default shop CATEGORY PAGE, that has completely different design. The same thing happens, when I click on the category link on the single product page.

I would like to achieve, that when I click on a product category link on the Single product page or on a link on the shop page item, I will be redirected to a category page that has the design I created with Essential grid. Is that possible?

Hello There,

Thanks for writing in! What you want is possible. By the way, there isn’t a feature in X or WordPress that can do this. You will be needing to install a 3rd party plugin to be able to pull this off. You can make use of the Quick Page/Post Redirect Plugin plugin instead. Please check it out here: https://wordpress.org/plugins/quick-pagepost-redirect-plugin/

Hope this helps.

Hello, thanks for the answer! I tried to solve my problem with the plugin you suggested in combination with deep linking according to this: https://www.themepunch.com/faq/deep-linking-grid-filters/
I was pretty sure that it will work, but it does not. Maybe you could have a look, where is the problem?
http://www.malkiapark.sk/eshop/

Hi there,

Deep linking is different, how about editing your grid’s skin and link your category layer/element to META. Example, category_link meta, then add custom fields to your product with name category_link with URL value.

Thanks!

I do not understand what you mean.
Let me show you what I need again. The shop, I am working on is: http://www.malkiapark.sk/eshop/. For example, lets see the first item: Tricko LION mb. Under the price, there were supposed to be three categories: PANSKE (male), TRICKA (t-shirts) and CIERNA (black). I am already taking the color category away and make it just a meta field under catagories link via skin editor, so just two catagories will be left. When you click on PANSKE, the default shop page opens and this what I need to change. When you click on TRICKA, shop page created with essential grid opens. I secured this via that redirection plugin. I tried to add deeplink to filtered essential grid, but it does not work. And this is the thing I want to solve. When I click on a category, I will get the essential grid shop page filtered by chosen category.

Hi there,

I understand what you mean, but it’s not currently possible so I suggested using custom fields to add your category link or name. Then display that name using skin layer while linking to custom field’s link.

Usually, category links are pulled using this function https://codex.wordpress.org/Plugin_API/Filter_Reference/term_link. Any plugin that utilizes that function (probably the plugin you use) could change the term URL. A simple example is this

add_filter('term_link', 'change_term_link', 99, 3);

function change_term_link( $url, $term, $taxonomy ) {
   
    switch ( $term->ID ) { //category ID
            case 363 : $url = 'http://example.com/music-sheets/'; break;
            case 364 : $url = 'http://example.com/music-insruments/'; break;
    }

    return $url;
   
}

The 363 and 364 are category ID, and to find the ID, please check here https://theme.co/apex/forum/t/setup-how-to-locate-category-ids/60

But, this one requires hard coding and you may add it to your child theme’s functions.php

The only thing that I’m not sure is, if essential grid uses that function/filter. It may still not work.

Thanks.

Hello, thank you for the answer. I do not know how did it happen, but suddenly my solution started to work. I mean the combination of quick redirects plugin and deeplinking javascript. Thanks again for your time.

Ah, glad it works now and you’re always welcome!