-
AuthorPosts
-
August 26, 2024 at 3:19 pm #1465419
Hi
We want to use a WooCommerce shortcode like described here:On the page described below, we used it like this
[products columns="3" on_sale="true" paginate="true"]
This should show all product on sale with a pagination, but there is no pagination.
When we us it like this
[products columns="3" limit="12" on_sale="true" paginate="true"]
it shows only 12 products but also without pagination.
Also the dropdown, how much products should be shown (15, 30, 45) in the header does not work.
Our question is, if this is an Enfold problem or a WooCommerce problem?
Thanks very much.
Best regards
MikeAugust 27, 2024 at 5:22 am #1465456Hey Michael,
Thank you for the inquiry.
Please try to add this hook in the functions.php file:
function ava_woocommerce_pagination_actions() { add_action( 'woocommerce_pagination', 'woocommerce_pagination', 10 ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); remove_action( 'woocommerce_after_shop_loop', 'avia_woocommerce_after_shop_loop', 10 ); } add_action( 'init', 'ava_woocommerce_pagination_actions' );
Then use this css code to adjust the style of the pagination.
.template-shop .products { overflow: auto; } .woocommerce-pagination ul li { display: inline; }
Best regards,
IsmaelAugust 27, 2024 at 12:43 pm #1465490Hi Ismael
This code does nothing. It only “destroys” the normal pagination we already had. We still have no pagination on the mentionned page.
I removed the code because it “destroys” the normal pagination we already had.
See private content for details.
Best regards
MikeAugust 28, 2024 at 5:38 am #1465534Hi,
Thank you for the update.
On our end, the pagination displays correctly when we implement the modifications. We may need to access the site to check the issue properly. Please clone the site to a staging environment and provide the WP and S/FTP details in the private field.
Best regards,
IsmaelAugust 28, 2024 at 1:40 pm #1465570HI Ismael
Our customer has no staging environment, but you can check on production environment. See private content section.
By the way, is this a bug of Enfold, for that we have to use such code to have a pagination there?
Best regards
MikeAugust 30, 2024 at 12:14 pm #1465773Hi,
Thank you for the info.
We modified the filter a bit and updated the css code. Please check the link in the private field.
Best regards,
IsmaelAugust 30, 2024 at 4:08 pm #1465804Hi Ismael
Thanks very much.
There is a pagination, but it looks different that the default pagination on the shop main page or on a product category page. There we have circles with the mage numbers.
Also the dropdown to choose if it has to show 15, 30 or 45 products on one page does not work. on the shop main mage or on a product category page this also works.
Are this Enfod or WooCommerce problems?September 2, 2024 at 4:31 am #1466017Hi,
It looks different because it is using the default WooCommerce pagination. Unfortunately, we cannot apply the theme’s pagination to the product shortcode. Please try using the Product Grid element instead, or use the following css code to adjust the style of the default pagination.
.woocommerce-pagination ul li { display: inline; float: left; height: 35px; width: 35px; line-height: 35px; text-align: center; padding: 0; border-radius: 100px; margin-right: 3px; margin-left: 0; box-shadow: 0px 0px 1px 0px rgba(0,0,0,0.2); }
Best regards,
IsmaelSeptember 3, 2024 at 7:35 am #1466085Hi Ismael
Ah okey, so with WooCommerce shortcodes, the Enfold pagination does not work? This would be a nice extension of Enfold ;-)
Anyway, your CSS code does not change anything, it is still the other pagination.
Another question. As also the dropdowns at the top (“Zeige 15 Produkte pro Seite”) seems to not work, how we can hide them only on this page with CSS code?
Best regards
MikeSeptember 3, 2024 at 12:38 pm #1466113Hi,
Anyway, your CSS code does not change anything,
Have you tried toggling or temporarily disabling the Enfold > Performance > File Compression settings?
To hide the sorting dropdown, please add this css code:
ul.sort-param.sort-param-count { display: none; }
Best regards,
IsmaelSeptember 10, 2024 at 11:34 am #1466614Hi Ismael
Thanks für the code to hide the sorting dropdown, this works.
The navigation style still does not work, also after disabling the Enfold > Performance > File Compression setting.
I see that the css code is in the stylesheet but the navigation does not change.
Best regards
MikeSeptember 11, 2024 at 12:40 pm #1466706Hi,
The style is applied to the pagination, but the circles are not visible because their background color is the same as the page’s background color. To change the background color, try adding the following css code:
.woocommerce-pagination ul li { background: #f9efea; margin-bottom: 30px; }
Please check the screenshot in the private field.
Best regards,
IsmaelSeptember 11, 2024 at 1:22 pm #1466711Hi Ismael
Oh, I didn’t realize, that this is the same color, sorry ;-)
Now it works fine, thanks very much.
You cacn close this issue.
Best regards
Mike -
AuthorPosts
- The topic ‘WooCommerce Shortcode does not work correctly’ is closed to new replies.