User & Post Followers as Post Relation

  • Member Access
  • Show your post /user followers as hyperlink.design does with the upvoters and the user profiles. In your post type, create a post relation “Followers” with the Custom Relation Key “post-relation-followers”, that is related to “profiles” post type and that is of Relation Type “Belongs to many”. In your “Profiles” post type, create a post relation […]

Show your post /user followers as hyperlink.design does with the upvoters and the user profiles.

In your post type, create a post relation “Followers” with the Custom Relation Key “post-relation-followers”, that is related to “profiles” post type and that is of Relation Type “Belongs to many”.

In your “Profiles” post type, create a post relation “Followers” with the Custom Relation Key “user-relation-followers”, that is related to “profiles” post type and that is of Relation Type “Belongs to many”.

Now go to “Filtering” and add a Post relation filter with the label “Followers” and the data source ” Followers”.

For “profiles” post type, create a post relation “Following” with the Custom Relation Key “post-relation-followers”, that is related to “your desired post types” and that is of Relation Type “Has many”.

Now go to “Filtering” and add a Post relation filter with the label “Following” and the data source ” Following”.

Create a preview card for your profiles (Ex: that only contains the avatar / name).

In any of your post type single post template, add the Post Feed (VX) widget connected to the Search Form (VX ) that has the filter “Following” with “Add default value” checked, and a default value that is the post id.

On search form  reset, let it have the default value and optionally, hide the filter so that we will see only the followers preview cards.

This code goes in your functions.php

When the follow action is triggered, the follower will become related to the post as a post relation. 

If you already have followers that are not yet saved as post relations, use this function to trigger the update of all by accessing this URL as Administrator.

https://yourwebsite.com/wp-admin/?update_relations=run

  • UI/UX Designer & Wordpress Developer
  • Filter by
Keywords
Open tickets
Latest activity
Latest created
User & Post Followers as Post Relation

Your guide is set up to show followers of CPTs, is there a way to do the same for profiles? So, when a user follower another user (on their profile) then they are displayed on that users profile as a follower?

  • Filter by
User & Post Followers as Post Relation
Keywords
Popularity
Latest activity
Latest created

No results available

Reset
  • Other Resources
The live notifications checker plugin is a Facebook notifications replica. updates LIVE the title page with (9) the number of unseen notifications and messages + a red dot to the favicon let’s you setup how often to do the check from Tools > Notifications Checker shows unread tab notifications even in between sessions or devices […]
The addons you must have for Voxel WordPress theme
  • Third-party
  • 2
Fast WordPress Hosting, Without Empty Promises
  • Third-party
  • 1