Custom Shortcode for User Read/Unread page/post button - Wordpress Solution
[Solved] - Custom Shortcode for User Read/Unread page/post button - Wordpress Solution
Try following codes
The Details: The [post_read] shortcode will store user data on whether or not a user has read the post/page based on there selection. The user will click a button once they have read or unread the page/post this data will save in the DB. All users are logged in. Things that need to happen Behind the scenes: The database will store the users selection 0-unread 1-read or similar depending on users selection for that post id How it would look On the Frontend to the user: Click here if you have have finished reading the page (button/input) (This is the original state) Congratulations on reading the page! If you would like to mark the page back to unread click here (button/input) (user will see this after they clicked the button. Unless they click the unread button, then it will go back to the original state above) How I would like to implement it on the post/page is by posting a shortcode. shortcode ex: [post_read] Additionally I need to retrieve data back from the database. I need a sum of all the individual user read pages in a value. So if the user has marked 35 pages as read the shortcode will display: 35 shortcode ex: [post_read_value] And I need to extract the sum of just the users read pages under a parent page. So if the user has read 35 post in total but 10 of them were under the parent page with ID=3254 the shortcode would display 10. shortcode ex: [post_read_value id='3254'] Thank you!!!

Solution - 1

25$ for that? You're joking, right?

Date: 2022-10-21 05:17:47
Category: Wordpress
More for You