Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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.
    #638433

    Hey 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,
    Ismael

    #640405

    Thnx, i ll give it a try and i ll get back to you

    #640486

    It worked perfectly !

    Many thnx!!

    #640683

    Hi,

    Great, glad you got it working :-)

    Thanks,
    Rikard

    #688603

    Hi 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

    #688758

    Hi!

    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,
    Basilis

    #689102

    Hi 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

    #691432

    Hi,

    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,
    Ismael

    #691703

    Hi 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!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Custom pagination for blog posts, affects and breaks pagination in shop page’ is closed to new replies.