Custom Header or Footer Post PDF Elements Hook

If you want to show custom header or footer data in your post PDF you can use this filter:

wordpress_print_posts_header_footer_html

An example:

add_filter('wordpress_print_posts_header_footer_html', 'custom_print_posts_header', 10, 2);
function custom_print_posts_header($position)
{
    $html = "";
    if($position == "headerTopRight") {
        $html = 'My custom header top right';
    }

    return $html;
}

Leave a Reply

Your email address will not be published.