hooks and php code
#1 Guest_Ray_*
Posted 30 April 2011 - 04:27 PM
Thanks.
#2
Posted 30 April 2011 - 09:35 PM
For an example, see http://ithemes.com/wp-content/uploads/2010/12/enable-google-analytics-540x358.png
(below the highlighted area)
Edited by Sridhar Katakam, 30 April 2011 - 04:36 PM.
Builder FAQ | Builder Wiki | Builder Basics Videos | Builder Advanced CSS Videos
Follow me on Twitter | Get latest news on Builder at our Facebook page | My Builder Snippets Blog
#3
Posted 02 May 2011 - 03:52 PM
Failing this, could I safely add my code to the header.php?
#4
Posted 02 May 2011 - 04:25 PM
you can always safely add code to header.php, as long as you make sure to use a child theme, and make such modifications in the header.php file in the child theme folder.
Using the functions.php file, and the standard WordPress wp_enqueue_script function, you can add (external) javascript to your site.
And it depends on the php code that you need to insert. Do you need to add the code inside the <head> section of your site, or if it should be executed before pages display (as you say), but contains html code that should go in the <body> section of your site.
Ronald
Join the iThemes Builder Community on Google+.
To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. Please also read the forum guidelines.
When asking your question/posting your request on the forum, please be as concise and specific as possible. The shorter your request, the more to the point, the more specific, the easier it will be for us to try and help out.
#5
Posted 03 May 2011 - 03:40 PM
But some of the code needs to grab a REQUEST variable from the URL or a form which sent the person to the site and save a cookie which we have to look up when someone signs up for membership (to have the source of each member). It's possible that based on this variable, the page that opens may vary which is why it can't be done after the page has loaded. Will code in header.php do this?
#6
Posted 04 May 2011 - 02:24 AM
if you can get this to work in a WordPress theme, you can also get it to work in Builder. I suggest you try adding your code and functionality using the default twenty-ten theme, and if that works fine, I see no reason why it should not work in Builder.
If you want particular support on Builder, please post in the Builder support forum.
Ronald
Join the iThemes Builder Community on Google+.
To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. Please also read the forum guidelines.
When asking your question/posting your request on the forum, please be as concise and specific as possible. The shorter your request, the more to the point, the more specific, the easier it will be for us to try and help out.




