WordPress.org

Ready to get started?Download WordPress

Forums

First time creating plugin, doesn't initialize (1 post)

  1. Littimer
    Member
    Posted 3 years ago #

    Hey all, I apologize in advance if this is not the correct forum for this question. Looking around though, I think this is the best place to ask.

    I have been teaching myself php, and my first real project beyond just a simple "Hello World!" function was to randomly select a "tip" out of a CSV file, and then pull an image related to whatever category the tip is from.

    However, once I call the function into the sidebar, nothing happens. No errors, nothing. I checked the url links and they are all valid. I'm honestly not sure where to go from here in terms of debugging. As it's a relatively short piece of code, I've copied it below for consideration.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The CSV files just have entries in one column, with the tip (Many entertainment options are free, such as a visit to the park!) separated from the category (Frugal) by a # symbol.

    In a perfect world, the images are named the same as the categories, and the plugin converts the category names to undercase and removes any spacing to correctly predict the img path.

    Is there anything that jumps out here that I'm doing wrong? Thanks in advance for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic