Javascript not working on index.php but it is working on single post's page
I am trying to use mathJax in my wordpress. According to the documentation at mathjax, the mathjax script url needs to mentioned in headers.php. Which is exactly what I did. And right now this is what the head section in the headers.php looks like:
head
meta charset="?php bloginfo( 'charset' ); ?" /
title?php wp_title( '|', true, 'right' ); ?/title
script type="text/x-mathjax-config"
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
/script
link rel="profile" href="http://gmpg.org/xfn/11" /
link rel="pingback" href="?php bloginfo( 'pingback_url' ); ?" /
!--[if lt IE 9]
script src="?php echo get_template_directory_uri(); ?/js/html5.js" type="text/javascript"/script
script type="text/javascript"src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
/script
![endif]--
?php wp_head(); ?
/head
This javascript is not loading on my website's index.php page, however its loading on a single posts page. What could be the problem. What am I missing here?
Topic third-party-applications headers Wordpress javascript
Category Web