Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi Matt,
    Apologies for the late reply, I was on a short holiday.
    You can add page numbers with a small code snippet:

    
    add_action( 'wpo_wcpdf_before_order_details', 'wpo_wcpdf_page_numbers', 10, 2 );
    function wpo_wcpdf_page_numbers ($template_type, $order) {
        ?><div style="position:fixed; top: -5mm; text-align: right;">Page {{PAGE_NUM}}/{{PAGE_COUNT}}</div><?php
    }
    

    as you can see, you can have the page number and the total page count, it’s in this part of the snippet:

    
    Page {{PAGE_NUM}}/{{PAGE_COUNT}}
    

    This code goes into your child theme functions (functions.php) Read this if you haven’t worked with actions or filters before: How to use filters.

    Note that this doesn’t work for bulk exports, as it will keep numbering.

    Hope that helps!
    Ewout

    Thread Starter mookie4a4

    (@mookie4a4)

    Thanks for the response! Works like a treat ??

    Happy Christmas!

    • This reply was modified 7 years, 11 months ago by mookie4a4.
    Plugin Contributor Ewout

    (@pomegranate)

    Great, glad to hear that!
    Happy holidays to you too ??

    Ewout

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add page numbers?’ is closed to new replies.