Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have created a child theme base on the new twentythirteen theme. I made a style.css file and put a few styles in it. I've selected the child theme and my css styles are working. No problem there.

Next I created a functions.php file and put a few simple functions in it. But, none of them are working. So, I stripped it down to just one function to test it out and it's still not working. WP does not seem to be seeing my functions.php file.

So, now, the only thing in my child theme function file is the following code. Can anyone give me any advice as to why this code is not showing up in the page head?

 function watercolor_add_typekit() {        
echo '<script type="text/javascript" src="//use.typekit.net/xxxxxx.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>';
}

add_filter( 'wp_enqueue_scripts', 'watercolor_add_typekit' ); 

Thank You!

share|improve this question
    
That's a strange looking enqueue. wp_enqueue_scripts is an action and not a filter(filters should return data also). –  t31os Aug 12 '13 at 9:38
    
Thank you, I changed it to add_action. Either one does work, but, you are right, add_action is the correct way. I discovered my problem was a typo elsewhere, so this code did work fine once my typo was fixed. –  user1388610 Aug 13 '13 at 3:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.