Timeline for Display data when category is empty
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 26, 2017 at 16:44 | vote | accept | Randomer11 | ||
Mar 12, 2017 at 14:13 | review | Suggested edits | |||
Mar 12, 2017 at 14:25 | |||||
Mar 6, 2017 at 12:55 | comment | added | Faisal Alvi | You can add condition to your custom function (see my updated ans below) so that data will display only if the page is category. Like: if (is_product_category()) { /*code*/ } | |
Mar 6, 2017 at 12:39 | comment | added | Randomer11 | If I use the woocommerce_after_main_content hook the content doesnt display at all, even the categories with products. | |
Mar 6, 2017 at 12:27 | comment | added | Faisal Alvi | You must have to use woocommerce_after_main_content. Please see my answer below for more detail. | |
Mar 6, 2017 at 12:24 | answer | added | Faisal Alvi | timeline score: 1 | |
Mar 6, 2017 at 12:18 | comment | added | Randomer11 | Hi Faisal , The page is a category and we use Yoast breadcrumbs not woocommerce. The code above is nothing more than a short description of the category which goes under the products so the after_shop_loop would be ideal placement , i did try the woocommerce_after_main_content hook but it done the same , it worked on categories with products but if there were no products it doesnt show. | |
Mar 6, 2017 at 12:08 | comment | added | Faisal Alvi | An action hook woocommerce_after_shop_loop is used only to display breadcrumbs in latest woocommerce so if there breadcrumb is not needed then your data will also not displayed so try to improve your code by selecting another action hook. Can you please tell whether the page is product page or category page? It would be great if you share screenshot. | |
S Mar 6, 2017 at 11:58 | history | suggested | Faisal Alvi |
woocommerce tag needed
|
|
Mar 6, 2017 at 11:56 | review | Suggested edits | |||
S Mar 6, 2017 at 11:58 | |||||
Mar 6, 2017 at 11:48 | history | asked | Randomer11 | CC BY-SA 3.0 |