Generated CSS (specifically for icons) Missing on Virtual Pages

Sort of a hopeful question as I know this is pretty customized… But essentially, I’ve reworked our “virtual pages” to be more based on Wordpress core functionality and not a custom class that I found online. That said, everything is working fine except that the Font-Awesome fonts are not being pulled in on the page and I’m not sure what else I could do to pull them in.

We’re using Wordpress URL rewrites to hit this function:

public function load_video_page($videoId){
	$content = "test";

	do_action('x_late_template_redirect');

	include "partials/view_video.php";
	die();
}

Inside that “partials/view_video.php” file we have this:

<?php get_header(); ?>

  <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">
       Test: <?=$content?>
    </div>
  </div>

<?php get_footer(); ?>

That’s the exact same content except we swapped out what’s inside the div role=“main” with this sample text. Everything works, it loads the header correctly and shows the page content correctly, but all of the Font-Awesome icons are missing from our navigation menu and don’t show up in the page content. Any idea what needs to be called to load in the correct generated CSS?

Hi @kcmwebadmin,

Thank you for writing in, please navigate to Theme Options > Miscellaneous and make sure Regular FontAwesome are enabled.

Cheers!

Thanks @friech, I did check there and see it is enabled. They’re working on regular pages but not when I include our template files manually. I feel like I’m missing a call I should include when loading up the template manually?

if it helps, this appears to be the only chunk of css missing: https://hastebin.com/rupahefibi.css

I tried searching X & Cornerstone for relevant code to see if there’s a function I can call but can’t seem to find a call I could use.

EDIT –

Huzzah! I think I found it. adding

 do_action("cs_late_template_redirect");

After the x_late_template_redirect seems to have taken care of it!

Hey @kcmwebadmin,

We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.