Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Boris Kamp
Boris Kamp
16,660 Points

post content loading dependent on user ID

Hi!

I've created a contact database using Filemaker but and would like show this data on a Wordpress website. Im gonna export filemaker to Excel and will import the Excel file into the Wordpress TablePress plugin. That way I will have about 50 tables with unique ID's, each table represents a contact. Next, Each contact will get an user login to login to WP. Now Im thinking of linking the tables to the user ID's by naming the tables the same as the user ID or something?

But how can I create a post that will only be visible to the one user it is meant for? I want to create a login button in the navigation bar, when the user clicks it, some php code must make sure it will load a custom post template and echo the user ID in the shortcode to display the table.

I have no idea if this is the best solution, unfortunately I have no experience with this. It would be great if anybody could give me some tips on how he/she would achieve this.

1 Answer

jeff creamer
jeff creamer
23,733 Points

Hey Boris,

Although there is probably an elegant PHP solution to this or by tweaking the TablePress plugin (which I haven't used yet), one temporary fix might be to make each table Password-protected and having each user's site login password also be the password to view their individual table. If tables are placed into a Post or Page format, enabling Password protection is a snap from the dashboard.

There might be some more workarounds suggested in the plugin's support forums:

https://wordpress.org/support/topic/how-to-organize-addition-of-information-by-users

https://wordpress.org/support/plugin/tablepress

Good luck!

-Jeff

Boris Kamp
Boris Kamp
16,660 Points

Thanks Jeff,

I will look into this once Im back from my holiday! If I can't figure it out I might come back to this topic and ask for help. I have bad experiences with wordpress forums, as the reply time is very bad in my opinion.