Ajax theme and wordpress head section

49 views Asked by At

My wordpress theme is responsive and is entirely loaded with ajax:

  • mobile-page.php loads when window.width < 1080px
  • desktop-page.php when window.width > 1080px.

At the moment it works like this:

  • wp-templatepage-homepage.php calls homepage-js() which is a js-file included through wp_enqueue_script
  • homepage-js() tests window.width and do an ajax call which dynamically loads the right php template file (Mobile / Desktop).

This is working great so far but the mobile version doesn't show up properly because I don't know how to put mobile.css into the head section of the website.

0

There are 0 answers