Forum Replies Created
-
AuthorPosts
-
OK – added with a comment right below the opening comment like so:
<?php /*############################################# HERE YOU CAN ADD YOUR OWN FUNCTIONS OR REPLACE FUNCTONS IN THE PARENT THEME #############################################*/ /*suppress error reporting on the front end*/ error_reporting(E_ERROR);
Seems to work – the error was only showing on brand new listings (I’m guessing that there is a calculation being made and when visits = 0 it’s trying to divide by it). I now get
Google Analytics (Last 30 days)
No stats yetWhich is good – thanks.
also, some listings display this…
Paolo
I was just trying to walk you through what I was thinking. A number of plugins just insert the UA code as a variable, since the rest of the code snippet is pretty much going to be the same. OK, that worked, or at least, doesn’t show on the front end. Thanks.
I would suggest that if you want the user to insert 8-10 lines of code a text area of similar size would help them get the picture.
Simone
Attached is a screenshot of where I’m entering the code: Geodirectory menu on WP>General>Google Analytics. Yellow highlight is where the UA code should go. I’ve used other plugins on more vanilla WP sites, and this format is always UA-XXXXXXX-XX.
For example, I’ve frequently used this plugin:
https://wordpress.org/plugins/googleanalytics/and the instructions read, in part:
Activate the plugin through the ‘Plugins’ menu in WordPress
Add the web property ID from Google Analytics (UA-0000000-0) to the settings (Admin > Settings > Google Analytics)So I don’t think this field is (or should be) set up for the user to enter php coding or the like – all you should need is the Google code… if it’s invalid obviously it should either trap the error or just not work, but if the code is now displayed on the front end I think you’ve got a bug.
Well, good thing I discovered this before going live! 🙂
Well, that didn’t do it. Something (and again I suspect that “Under Construction” theme) scrambled the state of my widgets pretty badly, and nothing is where it ought to be. Several of the sections have the same 2-3 widgets in them, and several are empty.
In my case I can delete everything and start over, down to reinstalling WP if it comes to that, but for future reference, am I correct in thinking that another theme could foul up the widgets like this? Or am I on the wrong track?
For now I will probably spend at least some time tinkering with piecing the sections back together…
-
AuthorPosts