Avvia un progetto

Hook per elementi personalizzati di header o footer nel PDF degli articoli

Se vuoi mostrare dati personalizzati nell’header o nel footer del PDF dell’articolo, puoi usare questo filtro:

wordpress_print_posts_header_footer_html

Un esempio:

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