|
#1
Jun 6, 2009, 04:39 AM
|
|
[SOLVED] Adding wp_footer before body tag
Hi All,
We are planning to use the atahualpa theme as our 'new' theme, after running an exisiting weblog for over 2 years now.
Unfortunately it only seems possible to setup this theme while it is active. I would have loved to set it up and activate only when ready.
While swithing between the old and new theme, I noticed that suddenly our life-treatening wordpress stats are gone.
I need to place the world famous <?php wp_footer(); ?> tag just before the /body tag to make the stats work.
How do I do that? Please tell me this plugin will continue to work with atahualpa?!
|
#2
Jun 6, 2009, 04:49 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
you can do that. See the option at ATO->HTML/CSS Inserts->HTML Inserts: Body Bottom
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
Jun 6, 2009, 11:18 AM
|
|
Wow, thanks for the fast response!
I think I'm short of a little knowlegde here, I found the location but somehow it seems that putting: <?php wp_footer(); ?> there would not work.
It appears exactly like that in the source of the page. Should it look like that?
Last edited by Chester; Jun 6, 2009 at 11:27 AM.
Reason: Deleted another question that I found the answer for.
|
#4
Jun 6, 2009, 07:06 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Oh, right, sorry been a long day and I'm tired. That spot is for HTML and this is PHP.
Does it have to be directly before the </body>? Nad do you want it in the generated code, or called just before the </body is written? I ask because it is being called when the page is generated, at the end of the page footer generation.
What plugin is using it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
Jun 7, 2009, 04:06 AM
|
|
No problem, I'm happy you're here to help.
It is the Wordpress.com Stats - plugin. We are using it on a daily base and it just does a better job for me then Analytics for instance.
This is a copy from their FAQ:
= What if the stats don't start showing up? Do I need anything special in my theme? =
Yes, your theme must have a call to `<?php wp_footer(); ?>` at the very bottom right before the `</body>` tag.
I recall I've done this manually long ago, in one of the php files that I'm currently using in my current theme.
I even believe I read those days that this is a pretty standard call, that just seems to be left out on ...% of the templates.
|
#6
Jun 7, 2009, 09:53 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Try this out. (I can't run stats on my local machine and have installed it on my hosted blog, but it will take some time to generate teh stats)
go to ATO->Footer->Show number of queries & timer? and set it to 'Yes - visible'
There is code in the Atahualpa to executes an <?php wp_footer(); ?> at the end of the footer creation. This may be your solution without having to do any coding.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Last edited by juggledad; Jun 8, 2009 at 06:25 AM.
|
|