0

I'm building a site for a client. They need a functionality where WordPress can tell if a logged in user has viewed a post in order that they might serve a notice or hide the original content.

I have never needed to do this before but am weighing up two approaches. Is it better to:

I also can't decide what the WordPress way of doing this is. A table level approach seems more intuitive to me but I've never had to implement a feature like this before so I wanted to get some advice.

Any comments/thoughts greatly appreciated.

1 Answer 1

1

WordPress already has both user and post meta data tables, and associated API for handling the data. Storing an array of post IDs for each user in user meta sounds like it would work for your application.

1
  • Yeh – that sounds good. Actually, I thought of an alternate way to express this problem and found a plugin that does a similar thing to what I want to do. That gave me a good idea of what the implementation might look like. The plugin was this one: codecanyon.net/item/mark-as-read-for-wordpress/… Commented Oct 24, 2014 at 15:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.