- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
I followed a tutorial to create a custom plugin which when activated allows me to add a custom widget to my side bar.
The custom widget uses the wordpress DB to get some information and present it. It works fine locally, but.. now that i have put the wordpress site live, the functionality has stopped working.
The Widget displays fine alongside all the styling. From what i can gather just information taken from the DB isn’t being returned, this is why i think its a DB issue.
Here is the plugin: Plugin
There is really not much to it.
Any ideas come to mind immediately?
I’ve just tried to var_dump($months) and i get this array(0) { } so yea it seems like it cnt connect to the DB.
Removed
“and post_date <= now()”
This was returning 0 rows, once removed i was getting the information. I am not quite sure what implication it will have though, i guess i will have to wait and see.
post_date <= now()
What that is saying is if the post_date is older or equal to current date/time.
haha, ye i understand what the code is saying. I just don’t know why that was causing the issue. I didint have any posts which were dated wrongly. So it was a bit confusing