Juha Mets?kallas
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Nextpage causes too many redirectsThanks for the link, but the referred page shows only how to insert a page break. I have done that and IIUC the link is correct. My issue is about what happens after clicking that link. Obviously a sequence of redirects happens, but why and where I can stop it.
Forum: Plugins
In reply to: [Easy Footnotes] Footnotes are left out in PDF created with WP-MPDFForum: Plugins
In reply to: [Easy Footnotes] Programmatic output of Footnotes (part 2)I posted the solution in the support forum of the WP-MPDF plugin.
Forum: Plugins
In reply to: [wp-mpdf] How to output a footnotes list by PHP?I spent a couple of hours yesterday to dig out a solution for this.
1. Go to the file system of your web server and locate your PDF theme (…/wp-content/plugins/wp-mpdf/themes/my_theme.php). I strongly recommend creating a copy of the default theme instead of editing the default one (so you have something to reverse in case something goes afoul). Open the theme in an editor. Hint: If your web host provides CPanel, you can use its file manager for all this.
2. In the beginning of theme file there are “global” declarations. Add as the last one onto its own line
global $easyFootnotes;
.3. Locate the line with
$pdf_output .= '<div class="entry">' . wpautop($post->post_content, true) . '</div>';
Replace it with
$pdf_output .= '<div class="entry">' . wpautop($content_with_footnotes, true) . '</div>';
4. Just above that line add the lines
$the_content = apply_filters('the_content', $post->post_content); $content_with_footnotes = $easyFootnotes->easy_footnote_after_content($the_content);
What these will do, is picking the content of your post and run it through the Easy Footnotes processor, so that the variable
$content_with_footnotes
will contain the content with the footnotes text. The replaced line in step 3 above will print this out. Note, contrary to what the name indicates the functioneasy_footnote_after_content
does not return just the footnotes text, but the whole content of the post. So without step 3 your get the post’s content twice, if you just add the returned part to your post.5. Save the edits.
6. If you want a separator for the footnotes section (see the documentation of Easy Footnotes), you do this by defining some CSS in your WP themes custom CSS settings. For instance
.easy-footnotes-wrapper { font-size: 80%; margin-top: 1em; border-top: 1px solid #666; }
Note, for some reason WP-MPDF doesn’t understand
font-size: smaller;
, so you have to use a percentage, if you want the footnotes text to be smaller.7. You need to repeat this CSS in your PDF theme. Locate the CSS file associated with your theme, my_theme.css, and copy the CSS there.
8. Clear you WP-MPDF cache, go to the post in the front-end and press the PDF button. Voilà!
A sidenote, if your post contains some content, which becomes visible by hovering (e.g. anchors to headers), these are included in the PDF.
- This reply was modified 5 years, 1 month ago by Juha Mets?kallas.
- This reply was modified 5 years, 1 month ago by Juha Mets?kallas.
- This reply was modified 5 years, 1 month ago by Juha Mets?kallas.
Forum: Plugins
In reply to: [wp-mpdf] How to output a footnotes list by PHP?I solved the issue. I will post the solution tomorrow, but now I need some sleep.
Forum: Plugins
In reply to: [wp-mpdf] Footnotes created with “Easy Footnotes” are left out in PDFI was afraid of that kind of response ?? Do you happen to know any footnotes plugin, that works right away with your PDF plugin? I’ve tested a couple, and they all either leave the footnotes out or embed them into the main text without any marking, that the content is a footnote.
Thanks anyway!
PS. I rather change to another footnote plugin than give up this PDF plugin.
Forum: Plugins
In reply to: [wp-mpdf] Fatal error: Allowed memory size…The cause was, as the error message says, insufficient memory to create PDFs. My provider raised the limit from 64 to 128 MB and PDF creation works again.
Forum: Plugins
In reply to: [Easy Footnotes] Line wrap at full stopNo takers?
PS. I bought you coffee ??
I updated. Seems ok. Awesome! Thanks!
Hey, where can I get the previous version?
Addendum: I found it.
- This reply was modified 5 years, 1 month ago by Juha Mets?kallas.
Forum: Plugins
In reply to: [Shortcoder — Create Shortcodes for Anything] Version 5.0 causes warningsEmail sent.
Forum: Plugins
In reply to: [Shortcoder — Create Shortcodes for Anything] Version 5.0 causes warningsAh, now I see the warnings also on the front-end of my site Finna babilejo (you don’t need to login in to browse the site). Have you an email address, where I can send the screenshots to?
Forum: Plugins
In reply to: [Page Builder by SiteOrigin] SiteOrigin Page Builder Editor not workErhan,
At least my site breaks with WP 5.3. See
https://www.ads-software.com/support/topic/lost-translations/
Forum: Plugins
In reply to: [Page Builder by SiteOrigin] Lost translationsHey, that was a good point. I tested, no help, so I decided to restore the back-up from last night. Not a big loss in content. All is ok now, so it’s WP 5.3 that causes issues. Sorry for the noise.
- This reply was modified 5 years, 3 months ago by Juha Mets?kallas.