• 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Thread Starter Burgejos000

    (@burgejos000)

    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.

    Thread Starter Burgejos000

    (@burgejos000)

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add database to a page’ is closed to new replies.