Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress: Custom Plugin Widget Issue

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #185440
    KKHAN
    Participant

    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?

    #185441
    KKHAN
    Participant

    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.

    #185442
    KKHAN
    Participant

    Removed

    #185444
    KKHAN
    Participant

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

    #185448
    chrisburton
    Participant

    post_date <= now()

    What that is saying is if the post_date is older or equal to current date/time.

    #185468
    KKHAN
    Participant

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Back End’ is closed to new topics and replies.