最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom field - What Wordpress "technology" would I use if I wanted subscribers to be able to mark pages with c

programmeradmin5浏览0评论

I'm creating a site with a large number of pages. I would like logged in users to be able to

  • write personal notes at the end of a page that could be compiled into a personal "notebook." So like comments, but users could only see their own. And there would be a way to aggregate it.
  • mark pages as "favorite", "to re-read", "memorize", etc. and then be able to use these designations to re-engage with the content. E.g. list pages on the site that have been designated as "to re-read"
  • +1 a counter to track the number of time they have read a page. Then I would want for users to see this data, e.g. percentage of pages read, most read pages, etc.

Can anyone tell me what aspects of Wordpress would be involved in doing these things? I don't want an LMS solution since, other than these features, the site is very simple. Just lots of pages.

I'm a long time Wordpress user, but I've only ever done off the shelf stuff. I'm willing to learn whatever necessary to do this, but I don't even know where to start.

[Please forgive me if this is not a suitable stackexchange question. If it's not, I'd appreciate advice on how to reframe it. Hopefully this doesn't fall into the "work for me for free" category. Thanks!]

I'm creating a site with a large number of pages. I would like logged in users to be able to

  • write personal notes at the end of a page that could be compiled into a personal "notebook." So like comments, but users could only see their own. And there would be a way to aggregate it.
  • mark pages as "favorite", "to re-read", "memorize", etc. and then be able to use these designations to re-engage with the content. E.g. list pages on the site that have been designated as "to re-read"
  • +1 a counter to track the number of time they have read a page. Then I would want for users to see this data, e.g. percentage of pages read, most read pages, etc.

Can anyone tell me what aspects of Wordpress would be involved in doing these things? I don't want an LMS solution since, other than these features, the site is very simple. Just lots of pages.

I'm a long time Wordpress user, but I've only ever done off the shelf stuff. I'm willing to learn whatever necessary to do this, but I don't even know where to start.

[Please forgive me if this is not a suitable stackexchange question. If it's not, I'd appreciate advice on how to reframe it. Hopefully this doesn't fall into the "work for me for free" category. Thanks!]

Share Improve this question asked Jan 8, 2020 at 9:02 webbirdwebbird 11 bronze badge 6
  • Hey, nice requirements :) You can achieve all these requirements. You have to create functionality to implement all these features in your website. I will try to help you in build these features as they seems interesting to me. Can we talk anywhere else? As, I think it will be a long conversation. – BlueSuiter Commented Jan 8, 2020 at 9:08
  • The storage side: I think you just need per-page user meta entries, e.g. named 'notes_<post id>', for the notes, and you can store them as serialized arrays of fields. You store flags and read counts there too, either in the serialized data or as a separate user_meta entry for each since that's easy enough to query for all pages in one go, or in a single user_meta entry for flags and counts for all pages. – Rup Commented Jan 8, 2020 at 10:23
  • @BlueSuiter Thanks for your response. Let me know where to contact you. – webbird Commented Jan 9, 2020 at 4:00
  • @Rup You shared a good method to store all information. – BlueSuiter Commented Jan 9, 2020 at 6:17
  • Actually I’m having second thoughts. update_meta_cache loads all of the user_meta in one go, so if you have large volumes of notes for lots of pages (or embedded images in the notes say) then it will load a lot more data than it needs to for just one page. So possibly meta isn’t the way to go, and you need another table for the notes. The read count and flags can probably still go in meta. – Rup Commented Jan 9, 2020 at 7:36
 |  Show 1 more comment

1 Answer 1

Reset to default 0

This is mostly a opinion based question and perhaps not best suited for WPSE as this is not a discussion forum, but a Q&A one.

That said, I'd mostly likely go with a custom post type note which would have the read page as post_parent, user ID as post_author and notes made by the user would go to post_content. There should be only one note per page per user, which would get created the first time user reads the page.

Simple WP_Query with user ID and post_type would return all the notes made by a single user.

Then there could be a utility taxonomy related to the CPT to keep track of the re-engage terms.

The read counter could be post_meta, maybe on the note, if it needs to be user specific. General counter would be post_meta for the page.

发布评论

评论列表(0)

  1. 暂无评论