I am using a “Favorites” plugin, and I need to show the posts (CPT) that a user has favorited, and allow them to manage (remove) them.
Thus Goals Are:
1. Show the posts they have favorited (I guess via a Query Loop that can access the wp_usermeta df_favorites
key).
2. Allow them to “unfavorite” a CPT via a trash icon (with or without a “Save” button being necessary).
3. Facilitate a login flow*
Here’s an example row from the wp_usermeta
table, showing that a user has favorited 4 posts:
umeta_id user_id meta_key meta_value
311 8 df_favorites a:4:{i:0;i:5211;i:1;i:5246;i:2;i:5209;i:3;i:5264;}
*I would add one more thing here for completeness of use case:
This page should not be accessible if the user signed out (it would be empty). So I imagine a flow where if they try to access the page while signed out, they are redirected to the login page (or a login form is present instead), and then upon login, redirected back to the page (or the login form disappears / the page is reloaded).
TBH I’m not sure how that last requirement touches Bricks, but wanted to include it for completeness.
-
What of this can be done with Bricks out of the box, if anything?
-
What requires custom coding, but can still use Bricks/Bricksforge?