sowmya
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Add some text immediately before the comments box in wp comment formThanks Alchymyth
Forum: Fixing WordPress
In reply to: Add tracking code to individual pageThanks for all your support!
Forum: Fixing WordPress
In reply to: Add tracking code to individual pageHello Songdogtech,
Thanks for your reply. I placed the code in the above mentioned way but not in index.php. I placed it in the childtheme’s functions.php./** Add top part of trackingcode */
<?php
add_action (‘genesis_before’,’trackingcode_do_top’);
function trackingcode_do_top()
{
if ( is_home())
{
?>
tracking code
<?php
}
}/** Add bottom part of trackingcode */
add_action (‘genesis_after’,’trackingcode_do_bottom’);
function trackingcode_do_bottom()
{
if ( is_home())
{
?>
tracking code
<?php
}
}
The above code works fine.Thanks!
SowmyaForum: Fixing WordPress
In reply to: Add tracking code to individual pageHello Songdogtech,
Under Settings–>Reading, out of the 2 options available for the front page displays, we have chosen the latest posts.
If we select the option ‘a static page’ we can choose one of our pages as our home page. If so we could have used the same method that you have told for adding the tracking code.
But since we have selected the recent posts option I am not clear how to use your method for the home page.
Thanks!
SowmyaForum: Fixing WordPress
In reply to: Add tracking code to individual pageHello Songdogtech,
Thanks for the reply!
I am clear about what you have mentioned above. I will try it out. But what about the home page? The home page I am using is not a static one. So will the above method me applicable? If not what can I do for adding the code to the homepage? Please clarify.
Thanks!Forum: Fixing WordPress
In reply to: Add tracking code to individual pageThanks Andrew. What about the home page? Can we follow the same method that you have suggested? I am not sure about the home page. Please clarify.
Thanks!