Showing posts from category on home page (davinci theme)

Martin Jahn

New Member
Hi,
Could you please advise how to add custom category posts on static page (home) in Davinci theme

Instead of "New arrivals" I want to show Best selling products from specific category.

So there should be "For Women" and showing top 8 items from Women category

Text with "New Arrivals" I already managed to rewrite into "For Women" but it showing New arrivals products obviously.

I found the code for arrivals:
Davinci: main-arrivals.php (products/main-arrivals.php)
$args = array(
'post_type' => 'product',
'posts_per_page' => 8,
'orderby' => 'date',
'order' => 'DESC',
// 'post__not_in' => $GLOBAL[ 'id_post_show' ]
);

I tried to add product categories command into it but nothing happened.

$args = array(
'post_type' => 'product',
'posts_per_page' => 8,
'product_categories ' => 'Women' ,
'orderby' => 'date',
'order' => 'DESC',
// 'post__not_in' => $GLOBAL[ 'id_post_show' ]
);

This is surely bad command, could you please suggest some? Thank you!
 
Last edited:

bestoftheweb

New Member
$args = array(
'post_type' => 'product',
'posts_per_page' => 8,
'product_category ' => 'Tech' ,
'orderby' => 'promotionVolume',
'order' => 'DESC',
// 'post__not_in' => $GLOBAL[ 'id_post_show' ]
);

I've tried a range of variations without success, anyone had any luck with this?
 

bestoftheweb

New Member
Hi,
Could you please advise how to add custom category posts on static page (home) in Davinci theme

Instead of "New arrivals" I want to show Best selling products from specific category.

So there should be "For Women" and showing top 8 items from Women category

Text with "New Arrivals" I already managed to rewrite into "For Women" but it showing New arrivals products obviously.

I found the code for arrivals:
Davinci: main-arrivals.php (products/main-arrivals.php)
$args = array(
'post_type' => 'product',
'posts_per_page' => 8,
'orderby' => 'date',
'order' => 'DESC',
// 'post__not_in' => $GLOBAL[ 'id_post_show' ]
);

I tried to add product categories command into it but nothing happened.

$args = array(
'post_type' => 'product',
'posts_per_page' => 8,
'product_categories ' => 'Women' ,
'orderby' => 'date',
'order' => 'DESC',
// 'post__not_in' => $GLOBAL[ 'id_post_show' ]
);

This is surely bad command, could you please suggest some? Thank you!
 
Top