-
AuthorPosts
-
May 23, 2016 at 6:43 pm #637014
Hi there, I saw your reply given here https://kriesi.at/support/topic/custom-function-so-i-dont-need-to-edit-core/ in order to customise the pagination for my blog pages. I wanted to hide the number of pages and the arrows from the pagination styling and show only the simple “Previous” and “Next” links on the left and right hand side.
I managed to get that working (by commenting out some code as in https://kriesi.at/support/topic/custom-function-so-i-dont-need-to-edit-core/) but the problem now is that these alterations have also affected the pagination for woocommerce products (shop page etc) and it seems to be broken.
Is there a way to distinguish between the two of them so as to keep your pagination for woocommerce pages like shop page etc and use my modifications for the pagination of the rest of the site ie blog posts.
Many thnx
- This topic was modified 8 years, 7 months ago by george.
May 26, 2016 at 4:45 am #638433Hey George,
Thank you for using Enfold.
Instead of commenting it out, wrap it inside a conditional function. Use is_page or is_shop. https://docs.woothemes.com/document/conditional-tags/
Best regards,
IsmaelMay 30, 2016 at 2:42 pm #640405Thnx, i ll give it a try and i ll get back to you
May 30, 2016 at 4:46 pm #640486It worked perfectly !
Many thnx!!
May 31, 2016 at 5:47 am #640683September 19, 2016 at 4:43 pm #688603Hi there again!
After the recent enfold 3.8 update, my custom pagination for my homepage disappeared completely underneath the latest posts.
The pagination shows ok in shop pages and inside posts categories (i use, is_page and is_woocommerce as you suggested above and worked fine up to the update).
Could you advise if something changed in terms of declaring the pagination for the homepage? Do i have to declare the homepage separately as i do now with is_page and is_woocommerce?
Many thnks
September 19, 2016 at 8:25 pm #688758Hi!
Homepage can be targeted with is_home()
Please use that one and let us know if we can help you further.
Thanks a lot
Best regards,
BasilisSeptember 20, 2016 at 12:20 pm #689102Hi there,
Thank you for your immediate reply. Unfortunately i am obviously doing something wrong, although i target is_home() no pagination appears in homepage.
Could you please have a look below in my old code that was working perfectly ok up to the enfold update, and suggest/correct something to target my custom pagination to my homepage?
Also, why this changed after the update?
Many thnx
September 26, 2016 at 4:40 am #691432Hi,
The code above looks a little broken because of the forum’s auto-format features. Please post the code on pastebin.com so that we can test it on our own installation. Did you use the is_woocommerce() conditional function? Maybe, that’s why it’s not working in the home page.
Best regards,
IsmaelSeptember 26, 2016 at 2:39 pm #691703Hi Ismael,
thank you very much for helpling me out in this one. After looking more carefully in to the code, i figured out what you changed in your code with the update.
In the avia_pagination function code, after the update you changed
$pages = $wp_query->max_num_pages;
to
$pages = $use_query->max_num_pages;I corrected that back in to my avia_pagination function inside my functions.php in child and now works exactly as before.
Thank you!
-
AuthorPosts
- The topic ‘Custom pagination for blog posts, affects and breaks pagination in shop page’ is closed to new replies.