WordPress.org

Ready to get started?Download WordPress

Forums

How to add database to a page (4 posts)

  1. Burgejos000
    Member
    Posted 1 year ago #

    Hello there. I am writing a script to pull information from a database and display it on a page. However, I have no idea where I would put this script. I have 3 different scripts to put on 3 different pages. I'm assuming I would put it in a .php file in the file directory, however, i am unsure. Any ideas?
    Thanks

  2. Well.. it depends on how and what you are doing. Based on the limited information provided... here is one approach:

    Add the scripts to your child theme's functions.php file.. and load them into the "content" filter using conditionals to determine which page to display them.

  3. Burgejos000
    Member
    Posted 1 year ago #

    Well, we are making a site almost like a business directory. Somebody will click on a link and based on their location, a table of local businesses will populate. We are working to develop that script, but we cant start testing out work until we know where to place the script.
    Where would the functions.php file be? We are fairly knew to the directories.

  4. Burgejos000
    Member
    Posted 1 year ago #

    and what do you mean by "load them into the "content" filter using conditionals to determine which page to display them."? i am fairly new to all of this

Topic Closed

This topic has been closed to new replies.

About this Topic