Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Adding wp_footer before body tag (http://forum.bytesforall.com/showthread.php?t=1942)

Chester 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?!

juggledad Jun 6, 2009 04:49 AM

you can do that. See the option at ATO->HTML/CSS Inserts->HTML Inserts: Body Bottom

Chester 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?

juggledad Jun 6, 2009 07:06 PM

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?

Chester 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.

juggledad Jun 7, 2009 09:53 AM

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.

Chester Jun 7, 2009 10:24 AM

Quote:

Originally Posted by juggledad (Post 8019)
There is code in the Atahualpa to executes an <?php wp_footer(); ?> at the end of the footer creation.

I'm so stupid. You gave me the final hint. I was already showing my suprise in my previous post the that wp_footer call wasn't in there, but it is. The fact is when you're logged in as admin, depending on you stats-settings it won't show it to you in the source, since you don't want it to count your own visits.

Once I logged out it was there, even without your option switched on.

Thanks and sorry.

ps. What do you think sofar? (warning; non-english site) www[dot]salek[dot]nl/blog


All times are GMT -6. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.