Not handling post carousel well
-
I have a post carousel at the bottom of most posts that shows related posts by category. These end up being printed like individual featured images making a real mess.
I also have horizontal navigation buttons at the bottom of posts that end up printed vertically – another mess.
-
Hi @vormwmik54, nice to digitally meet you, and sorry ya that sounds unappealing. Let’s see what we can do…
Could you please provide the URL of your site where you’re having this issue (with Print My Blog activated)?It sounds like it would be best to just hide those related posts carousels and the navigation buttons, right?
Hi Michael,
Nice to ‘meet you too!…and thanks for the response.https://mjvaquatics.com / https://mjvaquatics.com/blog2
If there’s a way to hide these portions from PMB, it would be great (as these have no purpose in the printed ebook/text anyway).
Oh I forgot, On some posts I also often have a section of embedded youtube videos just before the posts carousel that could be hidden as well (although I have no idea how – but reminds me of ‘hide when printing’ in Lotus Notes/Domino)
Hi @vormwmik54, adding this custom CSS to your theme should remove the related posts carousel and the menu (we’re not all the way there, but it’s a start).
Here’s how you can add it:7
1. Go to wp-admin on your website
2. On the left, under “Appearance”, click “Customize”
3. On the left, under Additional CSS” add the the following code:.pmb-posts .uagb-post-grid{ display:none; } .pmb-posts .wp-block-uagb-buttons{ display:none; }
Although, even with that, I don’t think you’ll be entirely satisfied yet. It will still say “Other Water Quality Related Posts:” etc, have those cute fish ASCII art, etc.
But before we proceed with that, there’s some more info that could help: can you share with me how you’re adding all that repetitive content? Have you manually copy-and-pasted that into the bottom of each post? Or is it getting added automatically by a plugin? Also, I see some of the blocks contained “uagb” in their CSS classes. Are those blocks from a particular page builder or your theme/
Also, can you please point me to a specific post that has those embedded YouTube videos?
Michael,
Wow – that little block of code makes a BIG difference! – kudos and THANK-YOU for your help!
I am using the Gutenberg block editor and nearly all the repetitive stuff are Gutenberg Reusable Blocks. So for 3 authors I have 3 different reusable header blocks. The footer for all posts is a single reusable block. The post carousel’s are all reusable blocks based on the various categories. (But for PMB, the ‘Post Footer’ with ASC II fish, copyright, disclaimer, donate button has little/no value.)…
Here’s one example where I use an ‘advanced column’ tool in a block from ‘Ultimate Addons for Gutenberg’ to embed YouTube videos…but these are only in some posts, most often just above the carousel, and not reusable blocks as the embedded youtubes are content relative.
https://mjvaquatics.com/cycling-a-new-aquarium/regards, ~Mike V.
Ah ok, good to know it’s reusable blocks.
I would suggest you modify the reusable blocks and add the CSS class “pmb-screen-only” on them. (Read more about it here). That will prevent them from being shown in printouts, but leave the alone on your website.I just tried this and it can work but WP itself is a bit buggy around setting those CSS classes.
Also, I think I found a bug in my code that’s preventing that from working properly on the current version, and you’ll need to try it with this fixed version. Here’s how:
1. Download the new version from here: https://github.com/mnelson4/printmyblog/archive/BUG/fix-screen-only.zip
2. Go to your WordPress dashboard, click plugins, then “add new”, then “upload” and select the zip file you just downloaded
3. Deactivate the previous version Print My Blog
4. Activate the new version of Print My BlogPlease let me know if you have any questions
Hey Michael,
This is great. Thank-you for the help. We are so close. I don’t have a way to set css in the footer for the HTML ASC II fish (which I could live with as not a bad footer ending in the printed post), but I’d really like to hide the paypal ‘Donate’ short code button (in that same ‘footer’ reusable block). Any Ideas?
Thank-you again, ~Mike V.
I found a work around by putting the ‘Donate’ button short code inside an advanced column block that had the “pmb-screen-only” in the css. The column block creates a slight bit of unwanted space between when viewing the button and the copyright statement.
I guess another option for the times the blog will be printed would be to delete the button short code in the reusable block for printing, then put it back after. A little bit of a hack, but is an option unless you have some magic.Also, I have a question… I usually use Firefox, but even if I PMB from MS Edge, external links are dead. Shouldn’t they work?
regards, ~Mike V.
One other question…at the bottom of every page I see…
https://mjvaquatics.com/?format=pdf&post-type=post&order-date=desc&order-menu and it continues. Why is this and can we prevent? (note it is just printed, not a link.
-
This reply was modified 4 years, 3 months ago by
~Mike V..
Update: I take it back…In MS Edge, I was using MS Print to PDF and links were dead. I switched to Save as PDF and links are fine!
So now I need to figure out a cover and just maybe a table of contents maybe even with links!-
This reply was modified 4 years, 3 months ago by
~Mike V..
Phew! You’ve been busy!
The column block creates a slight bit of unwanted space between when viewing the button and the copyright statement.
I see there’s an empty paragraph tag (ie
<p></p>
) at the start of that reusable block. If you can find it and remove it, it should take care of that whitespace. If you can’t remove it (maybe WordPress is adding it automatically?) you can add a CSS class onto that particular reusable block and we can remove the whitespace with a bit of CSS code.I usually use Firefox, but even if I PMB from MS Edge, external links are dead. Shouldn’t they work?
Each browser does things its own way; Firefox’s PDFs don’t include hyperlinks but others do. While browsers do a pretty good job of printing, there are inconsistencies like this that I admit are annoying (and is part of why I’m working on a “Pro” version which uses a paid service to generate the PDFs.) So ya I’d just use a different browser (one which includes working hyperlinks, like Edge or Chrome) if that’s what you’re wanting.
One other question…at the bottom of every page I see…
The browser is automatically adding that to the footer, but you can instruct it not to. I actually made a FAQ for this with a couple videos that I think should give you what you need.
So now I need to figure out a cover and just maybe a table of contents maybe even with links!
Yaaa once I have the Pro version done, it should help with these (it optionally adds a cover page) and a table of contents. Sorry it’s not quite there yet. I’ve heard of people using Calibre to create a table of contents themselves, but I have no experience with that.
Let me know if you have any more questions!
I see there’s an empty paragraph tag (ie <p></p>) at the start of that reusable block. If you can find it and remove it, it should take care of that whitespace. If you can’t remove it (maybe WordPress is adding it automatically?) you can add a CSS class onto that particular reusable block and we can remove the whitespace with a bit of CSS code.
<< Actually the button is at the end of the block – I removed a bit of padding so it’s not quite as bad.
Each browser does things its own way; Firefox’s PDFs don’t include hyperlinks but others do. While browsers do a pretty good job of printing, there are inconsistencies like this that I admit are annoying (and is part of why I’m working on a “Pro” version which uses a paid service to generate the PDFs.) So ya I’d just use a different browser (one which includes working hyperlinks, like Edge or Chrome) if that’s what you’re wanting.
<< I found that SAVING as PDF in MS Edge resolved the issue.
The browser is automatically adding that to the footer, but you can instruct it not to. I actually made a FAQ for this with a couple videos that I think should give you what you need.
<< Doh – I found where I can supress header/footer!
So now I need to figure out a cover and just maybe a table of contents maybe even with links!
Yaaa once I have the Pro version done, it should help with these (it optionally adds a cover page) and a table of contents. Sorry it’s not quite there yet. I’ve heard of people using Calibre to create a table of contents themselves, but I have no experience with that.
<< I got creative and created a post cover and contents after a page break, made the publish date 1900 so it’s on the end, and PMB oldest first – Works Well!!
Michael – Thank-you for a great piece of software AND for taking the time to help me.
KUDOSOk cool. Glad to hear it finally worked out!
All the best with your Aquatics site!
Michael,
If you’re still there, I have one more ‘problem’.
In this (and other posts) embedded youtube videos, https://mjvaquatics.com/shaqs-pond/
even though I use pmb-screen-only, the video description is printed. It’s the description that appears on the video splash screen. I’ve created the same text with link that’s pmb-print-only…so I’m seeing the link text and the redundant video text when printed.Thoughts?
Michael,
Regarding the Shaq video series, I found a work around to include the videos inside an advanced column block which is set for pmb-screen-only. This works, but it would be better if embedded videos would honor the pmb-screen-only setting (or maybe I’m doing something wrong?)
-
This reply was modified 4 years, 3 months ago by
- The topic ‘Not handling post carousel well’ is closed to new replies.