How do I install recipe database in WordPress

3 replies
I have a SQL database of recipes and I am trying to get it in a wordpress site. I have done a new installation of WP then went into PHPMyAdmin and installed the database. It said it installed O.K. It is in the lists of databases and it named it "Recipes", how do I get it to come up in the site?

The DB is in catagories and sub-catagories but I don't know where to go from here.

Any help would be appreciated, DB's are not my strong suit.
#database #install #recipe #wordpress
  • Profile picture of the author nthmarketing
    Your going to have to write some PHP to query the data in the Database. The database is just where information is stored it doesn't really do anything you need to create a window into the database with some queries.

    Fred
    {{ DiscussionBoard.errors[4303925].message }}
  • Profile picture of the author mywebwork
    Yes, you will definitely need custom PHP code to do this. Essentially you need code to:

    (1) connect to the database (you can use some of the built-in WordPress functions here, or just do it independently)

    (2) Query the database - you'll probably want to use variables in the query so you can display items by category or provide a search facility.

    (3) Display the results on the page.

    In addition, if you want to make it look nice you might want to do an AJAX design, to avoid page refreshes. That will also involve JavaScript, or perhaps JQuery as it is included with WordPress anyway.

    Sorry, no "out of the box" solution I'm aware of, perhaps others are.

    Here are a few links if you want to attempt this:

    PHP MySQL Introduction
    PHP Tutorials: Creating a database using phpMyAdmin
    PHP/MySQL Tutorial - Part 1
    Writing a Plugin « WordPress Codex

    Best of luck with your project

    Bill
    {{ DiscussionBoard.errors[4311829].message }}
    • Profile picture of the author tjs1954
      Ok Bill, thanks for the information and the links.

      Tim

      Originally Posted by mywebwork View Post

      Yes, you will definitely need custom PHP code to do this. Essentially you need code to:

      (1) connect to the database (you can use some of the built-in WordPress functions here, or just do it independently)

      (2) Query the database - you'll probably want to use variables in the query so you can display items by category or provide a search facility.

      (3) Display the results on the page.

      In addition, if you want to make it look nice you might want to do an AJAX design, to avoid page refreshes. That will also involve JavaScript, or perhaps JQuery as it is included with WordPress anyway.

      Sorry, no "out of the box" solution I'm aware of, perhaps others are.

      Here are a few links if you want to attempt this:

      PHP MySQL Introduction
      PHP Tutorials: Creating a database using phpMyAdmin
      PHP/MySQL Tutorial - Part 1
      Writing a Plugin « WordPress Codex

      Best of luck with your project

      Bill
      {{ DiscussionBoard.errors[4312880].message }}

Trending Topics