Jump to content
Sign in to follow this  
hypman

Got child theme, need advice on where to place javascript please

Recommended Posts

hypman

I think i closed my previous post by mistake, ive had a child theme added (as i was told to) so now i need to know how/where to add the javascript for a/b testing and also for dynamic generated phone numbers. Please explain in simple terms : ) Thanks

Share this post


Link to post
Share on other sites
Simon
OK, each page has a 'slug' so I'm going to use for this example slug-1 and slug-2... add to functions.php in the child theme: [code]add_action( 'wp_head', 'a_b_test' ); function a_b_test() { if ( is_page( 'slug-1' ) ) { ?>

Share this post


Link to post
Share on other sites
hypman
Thanks Simon I do this through my cpanel not through the actual theme itself in wp?

Share this post


Link to post
Share on other sites
Simon
Whatever you use to edit the child themes functions.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×