Did you follow the instructions and just added
<?php if(function_exists(‘mpdf_pdfbutton’)) mpdf_pdfbutton(); ?>
to your template?
Please follow the instructions on the installation page. That code needs to be placed in your wordpress template (not PDF template) to add the link.
-
This reply was modified 5 years, 5 months ago by
fkrauthan.
Hi,
But what do you mean by “template”?
I use Elementor and the free Astra theme. And also a Astra child theme. Otherwise, except of this issue with the custom text for the PDF button, your plugin is working. The PDF is well created.
Please, can you explain what you mean by “template”? What kind of file is this?
Where can I find this? This is not clear for me. Sorry.
Thanks in advance.
Hi,
See here the “page.php” from my theme Astra that I use:
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://codex.ww.wp.xz.cn/Template_Hierarchy
*
* @package Astra
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); ?>
<?php if ( astra_page_layout() == 'left-sidebar' ) : ?>
<?php get_sidebar(); ?>
<?php endif ?>
<div id="primary" <?php astra_primary_class(); ?>>
<?php astra_primary_content_top(); ?>
<?php astra_content_page_loop(); ?>
<?php astra_primary_content_bottom(); ?>
</div><!-- #primary -->
<?php if ( astra_page_layout() == 'right-sidebar' ) : ?>
<?php get_sidebar(); ?>
<?php endif ?>
<?php if(function_exists(‘mpdf_pdfbutton’)) mpdf_pdfbutton(); ?>
<?php get_footer(); ?>
So, just before the footer, I have added the code:
<?php if(function_exists(‘mpdf_pdfbutton’)) mpdf_pdfbutton(); ?>
But, nothing changes.
So, for me it’s not solved yet. You have already changed the status “Resolved” and this is not true. 🙁
Please, try to be a little bit more clear or give me some details as I asked before.
Thanks in advance.
yes adding this method call to your theme (as mentioned in the installation guide) is all there is required. So if you don’t get the correct icon and instead a link you added the mpdf_pdfbutton call somewhere in your currently used theme files other then described in the readme. Unfortunately I can’t help you with your personal customization of wordpress.
Since the system is working as intended, the proper usage of the system is documented and I haven’t seen any indication that there is a bug I consider this resolved.
Hi,
I use the latest WordPress version 5.6. I saw that WP MPDF is not tested yet with this version, in fact it’s tested up to: V 5.1.8. So, it’ already 4 months old.
I use the “jQuery Migrate Helper” plugin because there are a lot of big troubles with WordPress 5.6 and older plugins.
“jQuery Migrate Helper” plugins has detected some issue with your plugin and it’s logged as following:
jQuery.fn.load() is deprecated
Plugin: DK PDF ../wp-content/plugins/dk-pdf/assets/js/admin.js
../wp-admin/admin.php?page=dkpdf_settings
Maybe my problem has to do something with this issue? I’m not an expert but I don’t image this message either.
I only want to help looking the raison why I have this strange problem.
Thanks in advance to help me further, please.
@alainmelsens maybe that is the issue? You are posting on the WP-MPDF plugin support board. But the error you just posted is for a plugin called dk-pdf (no idea what that is)
Oh, yes, this is the reason. I’m so sorry. I don’t know why I have posted this problem here. It’s indeed with the DK PDF I have problems, not with your plugin.
I don’t know why I have came here on you support forum.
My sincere apologies for this. If you can, you may deleted my posts here.
Again, sorry by this… 🙁
No worries. Feel free to checkout my plugin at some point. It is not as flashy but so far most people are very successful running it.