Support Forum
Well looking at your site at the moment both the wp_head() and the wp_footer() are being called OK.
One issue I do see idf that your theme is incorrectly loading the jQuery library from Google (and an old version) and without using the WP API to do so. That results in two copies being loaded. You can read up on that issue here:" http://codex.simple-press.com/.....-conflict/
YELLOW
SWORDFISH
|
First, thank you for all your answers and your time.
The wp_head() and wp_footer() are currently present because I manually added them.
Without them the forum page is blank
With them the forum is displaying, but the style is all broken.
Apparently there are a header.php fand and a headers.php, the header one is used by Simplepress and the headers one by the other pages. If I add wp_head() in the headers.php file, it breaks the layout on all the other pages too.
I looked at the jQuery library problem, it is indeed included twice on each page, one coming from the local server, one from google's CDN.
If the local version is the one to keep (because it's newer and added with wp_enqueue), why is my layout more broken when I simply delete the google one ? (the colored buttons on the top lose their style).
I contacted the person who made the website, who will look at the theme I guess, but I have no idea how this website was working if they had both hooks problems and jquery problems, even with multiple plugins...
The head/foot issue is indeed strange.
The jQuery one is not, however. What you are seeing is that your theme is loading the 'bad' jQuery and SP is loading the 'good' jQuery. But SP will only load jQuery on the forum page. So if you just remove the theme jQuery load then on all non-forum pages there will be no jQuery loaded at all so things will break.
If the theme is changed to use wp_enqueue_script() AND is set to load the WP version of jQuery correctly then you will then achieve the right copy on all pages.
But the head/foot issue is something else and most puzzling.
YELLOW
SWORDFISH
|
The jQuery thing is actally a little more complicated than that.
Due to the strange two header files thing, any change I make in the file used by SP has no impact on the rest of the pages.
On the SP page both wp's and google's jquery are included, but I can remove google's in header.php : it doesn't change anything, but breaks the page even more (and the rest of the website remains unchanged.)
On any other page, only google's is called. All pages are working fine, but are broken if I remove the line in headers.php (makes sense, there is no jQuery anymore), except the forum, which is still broken, but not more than before.
I really have no idea on how and why things are this way. If enqueueing and hooks are so important to themes, why didn't the theme authors include them ? And how are other modules working when the theme is obviously so flawed ?
Im my experience theme authors leave out the header and footer hooks through ignorance and lack of understading of their importance. The wp devs are so concerned with this they have been thinking of coding in checks although they have not gone this far yet.
Lot's of plugins will not need them just plugins that need to add something to one of those areas.
As to using thevgoogle cdn for jqyery then read our codex article. They do this in the belief that it is quicker - it is a techie thing but still a bad idea.
YELLOW
SWORDFISH
|
Hi !
So I fixed it. It isn't pretty, it's an awful hack and I'm not proud of it, but it's working right now.
What I did was check what was written with the wp_head() that could cause this to crash, by putting it between comments (<!---BEGIN--><?php wp_head();?><!--END-->), then loaded the page and looked at the source code.
I checked it with all plugins, with only SP, and without any plugin.
As you may remember, when wp_head was not present it was working okay, so I looked at everything between the comments and tried to figure out what could cause it to crash.
There was a huge blok of css styling that was added via add_action('wp_head') in my wp-functions.php, I commented that out and it was mostly back to normal.
I then proceeded to hunt down other code that left some residual errors and problems, and that's it.
Well at least it's working for now, I'll take another look at that later...
Thank you very much for your help and time. Your plugin is great, but the support you provide on your forums is top notch.
Feel free to edit the title to make it easier to find (I must have misclicked there ^^).
I hope your hand heals fine !
1 Guest(s)