• Hi
    It doesn’t works with me, PHP 5.6, WP 4.8.9
    Is there a Shortcut to add in the WP page ?

    My template full_width.php looks like this :

    <?php
    /*
    *
    Template Name: Full Width
    */
    get_header(); ?>
    <div class="wrap">
    	<div id="primary" class="content-area">
    		<main id="main" class="site-main" role="main">
    <?php if(function_exists(‘mpdf_pdfbutton’)) mpdf_pdfbutton(); ?>
    
    			<?php
    			
    			while ( have_posts() ) : the_post();
    
    				get_template_part( 'template-parts/page/content', 'page' );
    
    				// If comments are open or we have at least one comment, load up the comment template.
    				if ( comments_open() || get_comments_number() ) :
    					comments_template();
    				endif;
    
    			endwhile; // End of the loop.
    			?>
    		</main><!-- #main -->
    	</div><!-- #primary -->
    </div><!-- .wrap -->
    
    <?php get_footer();

    Thanks

    • This topic was modified 6 years, 2 months ago by mfoucault.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author fkrauthan

    (@fkrauthan)

    Hey,

    The plugin mainly supports single article printing. Therefor you would have to move the pdf print button into the while loop. Also make sure that you have the plugin correctly installed and enabled as the button will not show up otherwise.

    Thread Starter mfoucault

    (@mfoucault)

    Thanks @fkrauthan
    If I use a twenteeseventeen WP child theme, in which php file I need to put the line
    <?php if(function_exists(‘mpdf_pdfbutton’)) mpdf_pdfbutton(); ?>

    Nothing works for me. Thanks

    Thread Starter mfoucault

    (@mfoucault)

    3 other questions :

    • Do I have to add the post in the black/white list ?
    • Do in have to add a shortcode in the post content to show the PDF button ?
    • Do I have to add something in the /wp-mpdf/themes/ folder ?
    • Thanks for all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘It doesn’t works, no button on page’ is closed to new replies.