How to choose latest products in GK Title Overlay

Modern e-commerce WordPress theme to build successful online store with WooCommerce support.
GK User
Wed Oct 09, 2013 10:29 pm
Hi It says in the description of GK title overlay that you should be able to choose latest products in the widget but you can't. Is there a way?

Thx

Damien
User avatar
Fresh Boarder

GK User
Wed Oct 09, 2013 11:18 pm
And I'd also like to add Product Categories in the same way in GK Title overlay widget.
User avatar
Fresh Boarder

GK User
Thu Oct 10, 2013 8:16 am
GK Title Overlay displays one article (featured image and the title). You can choose latest post as a data source or also post categories, post slugs.

Unfortunately you can't choose product category. With products you can use GK Product Gallery widget.
User avatar
Moderator

GK User
Thu Oct 10, 2013 6:07 pm
Is there anyway to custom code to use product categories in stead of blog categories?
On this description of the widget http://demo.gavick.com/wordpress/rockwall/?page_id=1065 you mention "You can choose Latest Products, Categories slugs, Post slugs or Custom post types as a data source."

I would like to know if it's possible to custom code to use product categories.

Thanks,

Damien
User avatar
Fresh Boarder

GK User
Thu Oct 10, 2013 6:20 pm
Is there a way to just redirect a post slug to a product category?
User avatar
Fresh Boarder

GK User
Fri Oct 11, 2013 7:31 am
"Latest products" is a mistake I think, should be latest posts, but you can choose custom post type as a data source, then type "product" and you can select any product specifying offset option.

You have to do one modification to make it work. Open gavern/widgets.titleoverlay.php file and change this fragment: (around line 115)
Code: Select all
else if($config['data_source_type'] == 'custom') {
         $post_type = explode(',', $config['data_source']);
         array_push($results, get_posts(array('post_type' => $post_type, 'numberposts' => $amount_of_posts)));


to
Code: Select all
else if($config['data_source_type'] == 'custom') {
         $post_type = explode(',', $config['data_source']);
         array_push($results, get_posts(array('post_type' => $post_type,
          'numberposts' => $amount_of_posts,
          'offset' => $config['offset'],
          'orderby' => $config['orderby'],
          'order' => $config['order'])));
      }
User avatar
Moderator

GK User
Fri Oct 11, 2013 4:14 pm
Hi and thanks.
I didn't really get what you answered to. Was this alteration to be able to add products in the gk title overlay?

My other question was if it was possible to do something similar with product categories?

Thanks

Damien
User avatar
Fresh Boarder

GK User
Mon Oct 14, 2013 7:50 am
Yes, add this code and then you can add product to GK Title Overlay widget (you can choose specific product using offset option).

It's not possible with product categories, GK Title Overlay dislays only one product, so how it can work with product categories??
User avatar
Moderator

GK User
Mon Oct 14, 2013 11:19 am
Hi. There is a way to display categories like this.

http://designedgadgets.com/product-cate ... -outdoors/

Damien
User avatar
Fresh Boarder

GK User
Tue Oct 15, 2013 8:37 am
Now I understand, but it's a lot of GK Title Overlay modification, unfortunately it's beyond our technical support.
User avatar
Moderator


cron