Title: CSS bugs (seemingly)
Last modified: March 18, 2025

---

# CSS bugs (seemingly)

 *  Resolved [shamrock82](https://wordpress.org/support/users/shamrock82/)
 * (@shamrock82)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/)
 * PROBLEM 1
 * Embedded PDFs look different based on the logged in/out status of viewer. This
   WordPress post is public, not members-only. Why am I getting different UIs rendered
   for the PDF module based on whether the user is logged in or not? I actually 
   prefer the “logged out” UI, is there a way that can always be shown?
 * Screenshots: [https://drive.google.com/drive/folders/1NImpoGtO9mDzQ1FtYvcZcxC02YVrh9IO?usp=drive_link](https://drive.google.com/drive/folders/1NImpoGtO9mDzQ1FtYvcZcxC02YVrh9IO?usp=drive_link)
 * PROBLEM 2
 * The labels on the buttons Previous/Next page and Zoom In/Out buttons are missing!
   This is when the PDF embedder is in the “logged out user” UI state. How can I
   always show the words on the buttons?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-bugs-seemingly%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [shamrock82](https://wordpress.org/support/users/shamrock82/)
 * (@shamrock82)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18373625)
 * ChatGPT has determined that the PDF Embedder CSS and JS is not being loaded for
   logged out users.
 * Link to chat (skip over the 2nd interaction, I was checking custom CSS we inject
   on our pages): [https://chatgpt.com/share/67dca113-22d0-8010-aee0-3333c7ae1dca](https://chatgpt.com/share/67dca113-22d0-8010-aee0-3333c7ae1dca)
 * We haven’t implemented any MemberPress restrictions on this particular post, 
   nor have we implemented any file-type-wide restrictions using MemberPress, so
   I can’t figure out what is causing this.
 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18379520)
 * Hello [@shamrock82](https://wordpress.org/support/users/shamrock82/)
 * It looks like PROBLEM 1 and PROBLEM 2 are both a caching issue.
 * Our plugin does not care whether this is a logged in or logged out user that 
   is currently viewing the file.
 * Make sure you exclude PDF Embedder assets from the caching mechanism you have
   set up on your site. Here is a related article: [https://wp-pdf.com/docs/using-caching-or-minifying-plugins/](https://wp-pdf.com/docs/using-caching-or-minifying-plugins/)
 * You may also have other plugins that try to control which plugins and their assets
   are being loaded for different users.
 *  Thread Starter [shamrock82](https://wordpress.org/support/users/shamrock82/)
 * (@shamrock82)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18388329)
 * We don’t have caching enabled on our site because MemberPress advise against 
   it and I have disabled the only plugin we had that optimizes/minifies CSS or 
   JS ([SWIS Performance](https://ewww.io/swis/)).
 * Have you tested your plugin with Beaver Builder? Are there customizations that
   need to be made to your plugin or to our Beaver Builder theme in order for PDF
   Embedder to work properly?
 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18392405)
 * We don’t support Beaver Builder preview mode (when you see a page preview with
   our PDF Viewer inside the Beaver Builder editing interface), but our plugin should
   work just fine when you use a shortcode inside of text modules in its builder.
 * Regarding the assets – that’s definitely some kind of caching for logged out 
   users. Maybe it’s on a network level (Cloudflare) or inside one of the WordPress
   plugins – we don’t know.
 * Something is definitely preventing our plugin from loading its CSS files, so 
   you should take a look. Maybe there is something that is bundling your CSS files,
   or moves them to a different host (I see some CSS files are being loaded from
   the `assets` subdomain).
 * PDF Embedder JS assets are loaded just fine, it’s just the problem with the CSS
   not being loaded from `assets.*`.
 *  Thread Starter [shamrock82](https://wordpress.org/support/users/shamrock82/)
 * (@shamrock82)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18402457)
 * We’re using WP Offload Media on our site (by WP Engine).
 * WP Engine are telling me:
 * _[Me] **I’m assuming we don’t need to implement any extra customizations to the
   AWS Cloudfront server for Assets, is that correct?**
    [WP Engine] Yes, as long
   as our [Assets Pull guide](https://deliciousbrains.com/wp-offload-media/doc/assets-quick-start-guide/)
   was followed, it should be enough. The Assets Pull will take care of rewriting
   URLs for styles (CSS) and scripts (JS) which are registered through the WordPress
   enqueue system. If this isn’t the case for those scripts, you may try using the
   filter “as3cf\_get\_asset”, if possible. Please see documentation below on how
   it’s used: [https://deliciousbrains.com/wp-offload-media/doc/get-asset-url/](https://deliciousbrains.com/wp-offload-media/doc/get-asset-url/)
   It may say at the top that it’s deprecated, but it’s only the old add-on plugin
   that is deprecated. The filter is still being used on the current code of WP 
   Offload Media.
 * Does PDF Embedder use the “WordPress enqueue system” to inject CSS calls into
   pages?
 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18409541)
 * [@shamrock82](https://wordpress.org/support/users/shamrock82/)
 * Yes, the plugin uses `wp_enqueue_script()` and `wp_enqueue_style()` functions
   to register its own JS and CSS assets.
 *  Thread Starter [shamrock82](https://wordpress.org/support/users/shamrock82/)
 * (@shamrock82)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18432923)
 * To help others, I wanted to share that I’ve determined this is a conflict between
   MemberPress and this PDF Embedder plugin. It would be helpful if you could add
   this to the plugin’s documentation [@slaffik](https://wordpress.org/support/users/slaffik/)
 * **MemberPress Support**: “After checking the issue, I noticed a conflict between
   the PDF Embed plugin and MemberPress. I think that’s because the PDF Embed plugin
   adds its stylesheets into the body, not into the head, which is not the best 
   practice. So, I came up with this code snippet to load the PDF Embed stylesheet
   into the head, add it to the site theme’s **functions.php** file, and the PDF
   enclosure renders correctly now for logged out users.”
 * `// Load the PDF Embed style add_action('wp_enqueue_scripts', function() { wp_enqueue_style('
   pdfemb_embed_pdf_css', plugins_url('pdf-embedder/assets/css/pdfemb.min.css') );});`
 * I requested a code fix that would only load the PDF Embedder CSS if a PDF was
   actually embedded on a page, rather than loading it (potentially when not required)
   on EVERY page.
 * `// Load the PDF Embed style add_action('wp_enqueue_scripts', function() { if(
   has_block('pdfemb/pdf-embedder-viewer') ) { wp_enqueue_style( 'pdfemb_embed_pdf_css',
   plugins_url('pdf-embedder/assets/css/pdfemb.min.css') ); } });`
 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18433823)
 * We opted to load styles inline when the shortcode/block is rendered to avoid 
   extra overhead and performance issues when parsing the page/post content on whether
   the block/shortcode is present there for _each_ _request_ in order to determine
   whether we should include our styles or not.
 * I plan to release today a small hotfix release for Free – 4.9.1.
 * I’m not sure I will include the proposed fix there.
 *  Thread Starter [shamrock82](https://wordpress.org/support/users/shamrock82/)
 * (@shamrock82)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18434904)
 * Could you update this thread or link to your release notes please if you push
   a fix that negates needing to manually implement the functions.php code fix above
   please? Thx.
 *  Plugin Author [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * (@slaffik)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18435698)
 * I recoded this case in our internal system. If this change is released, I will
   definitely mention it in the plugin changelog so it will be clear that you can
   remove your codesnippet.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘CSS bugs (seemingly)’ is closed to new replies.

 * ![](https://ps.w.org/pdf-embedder/assets/icon.svg?rev=3227003)
 * [PDF Embedder](https://wordpress.org/plugins/pdf-embedder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pdf-embedder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pdf-embedder/)
 * [Active Topics](https://wordpress.org/support/plugin/pdf-embedder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pdf-embedder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pdf-embedder/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [labels](https://wordpress.org/support/topic-tag/labels/)
 * [rendering](https://wordpress.org/support/topic-tag/rendering/)

 * 10 replies
 * 2 participants
 * Last reply from: [Slava Abakumov](https://wordpress.org/support/users/slaffik/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/css-bugs-seemingly/#post-18435698)
 * Status: resolved