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;
}

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *