Skip to main content

Quick question on styling the "Access Denied" page

I'm trying to customize the "Restricted Access" page (the screen non-purchasers see). It seems this specific page outputs raw HTML with hardcoded inline styles (e.g., <div style="...">), so standard CSS overrides aren't working well.

I tried injecting custom CSS via hooks like fluent_community/portal_head or before_portal_dom, but no luck.

Is there a specific hook or filter to modify this error template? Or a recommended way to force custom CSS onto this specific screen?

Did you check Custom CSS from Settings > Customization > Custom CSS

try to add/manipulate css properties using !important. See if that works.

BenniePie

Tawsif Ahmed Riyad I tried in many different approach, but it doesn't work 🀣🀣

BenniePieΒ Oh I forgot to see the 'inline css' term in your post.

Error Page CSS Customization Hook has been added in v2.5.0

  1. Add this snippet:

    add_filter('fluent_community/error_page_custom_css', function() {
        return '.fcom_btn_primary { background: #e94560 !important; }';
    });
  2. Reload the error page β€” button color changes

  3. Remove the filter β†’ page renders normally with no emptyΒ <style>Β tag in source