Thread Starter
SORG
(@sorg)
Thank you! One last question:
How can i put the post title as the PDF linktext?
How to change this code?:
$pdf_button .= 'id="pdfbutton" href="' . apply_filters('the_permalink', get_permalink()) . $x . 'output=pdf" rel="nofollow">' . $buttontext . ' PDF Version' . '</a>';
with the function function mpdf_pdfbutton($opennewtab=false, $buttontext = '', $logintext = 'Login!', $print_button = true) {. You can write your own html code on the second parameter. Then the PDF icon wouldn’T be displayed and your html code would be displayed as link text.
Thread Starter
SORG
(@sorg)
And how can i keep the icon and use the POST TITLE as the pdf-link?
I would prefer sth. like “the icon”+”Barack-Obama.pdf”.
Don´t I need a php code instead of a html code? Maybe we´ve misunderstood each other.
What do you exactly mean? i didn’t understand your question sorry.
Thread Starter
SORG
(@sorg)
For example: I have the post, that title is named “Barack Obama”.
Is it posible to name the pdf link automatically “Barack Obama.pdf”?
Aditionally I want to keep the icon.
It´s better for SEO, i think, because so there would be individual named links to the files instead of static link-names like “Print PDF” or the like.
Thread Starter
SORG
(@sorg)
No i mean the linktext next to the little pdf icon on the post/page.
Now it is the linktext: “pdf version”
I want this linktext: “the post title”
NOT the URL
I hope i could explain, what i meant.
ahhh now i know what you mean. Hmm i think vor seo there is no win to have a link text like that becouse thats not a link text its just a higlight text. But you can try somthing like that on your template: on the mpdf_pdfbutton:
mpdf_pdfbutton(false, '<img src="' . get_bloginfo('wpurl') . '/wp-content/plugins/wp-mpdf/pdf.png" alt="'.$post->post_name.'.pdf" border="0" />')
i dont know if it works.
Thread Starter
SORG
(@sorg)
I´ve put the code in my template, but no change.
It isn´t that important – Your plugin is very useful even without this.
Thank you for your time.
Greetings