• I had an idea to add some extra pages. How ever I wanted to be able to add php code to them. Is that possible.

    One page was to be a list of members for an association. When the user has a admin role. That user can edit, change, update and add to this list. The list has to be in a mysql database.

    I do know some php coding. I never done it on wordpress before.

    The other page would be a list of tenants in the building. All most the same option as above.

    When I added a page. I just didn’t see an option to change the page to a PHP page. Any PHP code I type in this page would be ran when the page loads.

    Does some one have an idea or two.

Viewing 6 replies - 1 through 6 (of 6 total)
  • There may be a plugin that will create an admin UI for your admins to enter the data and provide short tags for the pages to display the data. That would be the easiest way, but you’ll need to search for an appropriate plugin.

    If you want to do some custom pages with PHP code, you can create some custom page templates, then assign the pages your create to those templates.

    You can write whatever PHP code you need, including database accessing, within the custom page templates and display it any way you want.

    You would need to create the MySQL tables for the members/tenants list separately, and could either use something like phpMyAdmin to enter the data in them, or build a UI for doing so.

    Thread Starter bigjoe11a

    (@bigjoe11a)

    A plug in maybe a better choice. can you give me an idea of what kind of a plugin would I need. the idea is to create pages with an option to add, edit or delete data from a database.

    I don’t know of any offhand, but you could do a search for plugins something like this, then look through what it comes up with to see if any meet your needs.

    Thread Starter bigjoe11a

    (@bigjoe11a)

    Well I don’t think what I’m looking for will show up when I do a search for plugins using the words data table. The idea is to create a new page and have the info displayed on that page. So it would have to create the page and then let me add what info I wanted to use. Like a database.

    What I thought you wanted to do was to create two data tables, one for members and one for tenants, allowing users with the appropriate rights to add members and tenants to those tables, then have the data displayed on the appropriate pages on your blog. So you need two things, a way to get the data in, and a way to display the data dynamically on a page or post, maybe via a shortcode.

    You can probably come up with better search terms, but if you’re looking for a plugin, searching with those terms will get you started, and when you get a feel for what people are calling what you want to do, you can focus your search.

    Others here may have some better ideas.

    Thread Starter bigjoe11a

    (@bigjoe11a)

    Yes and No. I need to create 2 pages with those options. The idea is to have one page that shows or displays the members. If the user viewing the page has a role of admin. Then he/she has the option to add, edit or delete the records. I just don’t know of any other way to explain this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘adding PHP code to a page’ is closed to new replies.