Adding the category description to the top of the category page
-
How to add the description to the top of the product-list + category pages?
I modified the AbstractProductList.php page to pass the desription to the shop render function, and added a custom shop.php file to my template “/jigoshop/” folder to pass description to the shop/list render function, and added the property into a custom list.php file in my template “/jigoshop/shop/” folder
But, I’m sure this would get updated when you publish a new version of Jigoshop. Is there a better way to customize the AbstractProductList.php
\jigoshop-ecommerce\src\Jigoshop\Frontend\Page\AbstractProductList.php
public function render()
{$query = $this->wp->getQuery();
$products = $this->productService->findByQuery($query);
$content = do_shortcode($this->getContent());return Render::get(‘shop’, [
‘content’ => $content,
‘products’ => $products,
‘product_count’ => $query->max_num_pages,
‘messages’ => $this->messages,
‘title’ => $this->getTitle(),
‘description’ => $query->queried_object->description,
]);
}
- The topic ‘Adding the category description to the top of the category page’ is closed to new replies.