[Plugin: Cookie Law Info] Banner does not show up
-
This looks like a very usefull plugin. Unfortunately, nothing shows up on my website (no return in the text field)
Do I need to insert a kind of additional tag in the header or footer to get it working?
I use my own theme in WordPress. http://www.3dtvnieuws.nl. I see some additional code added in the source of the website.
When I use a standard theme it seems to work O.K..
-
Hi hmwind,
It could be one of a few things:
– In your theme are you inserting/registering any custom scripts or overwriting jquery?
– Are you entering a carriage return in the text field? (known bug, working on this)
– In the ‘advanced’ options have you tried disabling colour pickers? (unlikely to be this but give it a shot)
– Have you tried it in the header and the footer?I should think it’s jQuery related though. Quite common in themes is seeing something like de-registering jquery then re-registering a previous version (e.g. 1.4.1) this causes clashes with plugins. The theme I use on cookielawinfo.com did this, I had to edit out those lines of code to get my own plugin to work! (not my theme, incidentally)
Hope that helps!
Hi Richard,
Thanks a lot for your very quick response. That is highly appreciated.
There is no carriage return in the text and I tried header and footer as well as disabling colour pickers.
As your plug-in works flawlessly in the standard theme I will have to check my own (adapted) theme for jQuery modifications. Maybe hard to find as I am in no way a PHP expert.
I’ll post my findings.
Hans
Hi Hans,
If you contact me via http://www.cookielawinfo.com/contact then we can exchange emails and you could send me your theme. If you’re not into PHP then I might be able to find it quicker than you. No guarantees about being able to fix it though but I’ll see what I can do.
š
Hi Hans,
It’s your theme unfortunately. Cookie Law Info requires jQuery to be running. If you look at the HTML source you’ll see that jQuery isn’t being loaded, nor are the other scripts required for the plugin. So that probably means your theme isn’t using the standard wordpress hooks for loading themes, etc, or is disabling all scripts in some way.
Your options are to either not use the plugin or upgrade the theme.
All the best,
RichardHi Richard,
Thanks a lot!
After adding:
<?php wp_enqueue_script(“jquery”); ?>
<?php wp_head(); ?>to the header.php of my theme ist seems to work now.
Now I have to make sure that other banners are not overlapping the banner of your plugin.
Hans
Hi Hans,
Good, that should work for jQuery though you’ll also need the scripts used here in the plugin function: cookielawinfo_enqueue_frontend_scripts()
However, I suspect this might not work, because your theme code is called after the plugin code, so the plugin code might not be able to load the dependent scripts. Hard to say without testing but either way you’re on the right lines.
Thanks for updating the forum, might well be useful for somebody else.
š
Hi Richard,
I got the plugin working properly after adapting my own theme. The main changes were adding the jquery lines as mentioned above and in addition I had to change some layout settings.
Is there another way to load your script functions (e.g. in the header.php)
I am unclear what kind of other functionality cookielawinfo_enqueue_frontend_scripts() offers. Is the Audit function part of that?
In the meantime I have added the plug-in to http://www.3dtvnieuws.nl and added a THANK YOU statement with link to the plugin on the cookies and privacy page
Hi Hans,
Great job getting it working, looks like you added the right functions in the right places. And thanks for the link!
Cheers
RichardHi
I’m having a spot of bother getting this to work on a site. All scripts appear to be output in the header, but there’s nothing displaying front end…
Any help appreciated.
Simon
Hi Simon,
You’re missing the main script, which isn’t appearing.
Now I might be wrong (can’t see your theme code to check) but this is possibly because your theme doesn’t implement the wp_footer hook. If you’re a developer that should give you something to go on, if not then a non-tech explanation is that it means your theme is possibly missing a key feature of WordPress that is required to output content. The solution would be to edit your theme and add it in. That’s something a developer should do.
Missing script is:
`<script type=”text/javascript”>
//<![CDATA[
jQuery(document).ready(function() {
var a = // …some HTML here
var b = // …some settings here
cli_show_cookiebar(a,b);
});
//]]>
</script>’Hope that helps.
Also please check:
– Running WP 3.3.1 or better?
– Running the latest version of the plugin?
– If you (temporarily) disable all other plugins does it start working?Richard, you’re a star. Thanks, I didn’t realise my footer was missing wp_footer. As stupid as that sounds!
All working, many thanks.
Simon.
Glad I could help Simon! If you like the plugin please consider rating it, I’d appreciate that š
Hello!
Thanks for creating this excellent plugin. I work for a charity and was dreading how much compliance with the new law was going to cost us, in fact the web company we normally use are trying to charge us £500 for a similar thing.
However I’ve installed your plugin and adjusted the settings but it doesn’t seem to be appearing on the site. I’ve tried it in the header and footer and disabled the colour picker but it still doesn’t show up. Oddly when I switch the show again bar on it does show up, but when I click it nothing happens.
We have a custom theme that aforementioned company built for us, perhaps that is the problem? Here’s our site anyway: http://www.womankind.org.uk
If you could give me any advice I’d be very grateful, I’m not great at HTML or PHP but happy to have a go!
Many thanks,
Sarah
The topic ‘[Plugin: Cookie Law Info] Banner does not show up’ is closed to new replies.