Was able to figure out that the meta value was being stored as a string, which doesn’t play nice with the meta query.
So what I had to do was do a like comparison with the serialized string version of my meta value. The meta query ended up like this
$args = array (
'meta_query' => array(
array(
'key' => 'following',
'value' => serialize( strval( $uid ) ),
'compare' => 'LIKE',
)
)
);
for more insght, check out this other post that helped me
Related Posts:
- How can I make it so the Add New Post page has Visibility set to Private by default?
- Publish Post After Click On A Link
- Action on post publish
- how to execute some code after a post is published in WordPress [duplicate]
- Function added to hook “new_to_publish” not executing – custom plugin
- How to write a new file when new post has been published in WordPress
- Add new post using a page inside the website
- WordPress display breadcrumbs using Yoast plugin [closed]
- Outbound link autometic converted into linkdirect , and not opening
- Display by Category in Admin
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Two problems on my WordPress installation [closed]
- posts comments goes to trash
- Contributive page where people logged in can write
- Excerpts on category page
- How to pull email and name from Flamingo plugin
- Which widget to use for display category post with view more? [closed]
- External RSS feed to WordPress Portfolio
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- Display wordpress post’s in popup?
- Unable to add TAB character to post?
- how to add text to posts from tags
- Add category selection to custom post type (plugin)
- Redirect to another page using contact form 7? [closed]
- Would Gutenberg be considered a PlugIn?
- pagination on data fetched using SQL query
- How to delete all trashed item in one-go
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- How to get the first post and second post in a wordpress blog?
- Is it possible to send blog posts via email to subscribers?
- Custom setup of wordpress comments that are displayed
- Is there any plugin which can paste a common content to my every post?
- Recent posts per category loop?
- ‘Organize Series Plugin’ as muti author feature
- Import Instagram post to WordPress blog post
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- How to get all posts belongs to a user between a certain date
- How do I publish portfolio items with a future date?
- wordpress content .php file in an iframe’s src in a wordpress post
- Making my plugin create a page?
- Is there a way to make the main page only display a brief description of the full article?
- How to change the post form from plugin?
- WordPress plugin Post Creation [closed]
- Don’t publish/update a post when a plugin finds errors in custom fields
- Allowing users to Sign-up > Login > Post articles that need approval
- wp-mail attachment is not sent for no reason?
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- posts from multiple post types in one slider
- How to display the featured post on the category page?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Flickering sidebar when scrolling page [closed]
- Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?
- Moving FB comments at the end of page
- Where Should i write the code for wordpress ajax voting?
- Sending HTML email containing custom fields to site users from WordPress
- download button for audio file in post [closed]
- check uncategorized category by default
- Print posts category or tag as a formatted journal
- Post status doesn’t update to ‘future’ every time?
- Creating an admin meta box to save post as pending
- Grab ID from post from plugin and use it to create an object
- Article content navigator in wordpress like mbaskool website
- WP::is_main_query() Not Working
- I would like to remove date display on photo preview
- Post deleted in trash [closed]
- Getting a list of the published posts
- How to relate 3 wordpress components with each other (Create database relationships)
- Change website directory safely to add a static page on startup
- Show related posts based of current ACF field name in a single page post (a loop within loop)
- If post exists in the database – each time goes on `else`
- Custom Template for wordpress cpt plugin
- Embed PDF into wordpress
- Hook Scripts and Styles in WordPress
- Get data from wp_posts of mysql in to variables of wordpress-php script
- WordPress plugin: Getting posts where checkbox selected
- using add_action without having custom plugin or theme
- What hook can I use to modify custom post data before it is displayed on the page?
- get current page number with wp_link_pages()
- problem with register_activation_hook in plugin
- How can i summerize posts or news automatically in word press site?
- WordPress “Add new tag” button is not working
- Delete data from custom table when deleting a post
- How to auto strip hyperlinks & images in wordpress post
- how can authors to define custom pages?
- Plugin is creating posts twice
- wp_mail – using a custom field value
- Edit part of a post
- WordPress Stats Plugin: Display Post Views [closed]
- WP Editor, save content and category on frontend
- Plugin for TinyMCE to create reference to other posts
- Problem with ajax plugin for refreshing posts
- Add posts from other WordPress blog to the current one
- Link Posts to External URL
- How to Get Recent 5 post in My Title bar?
- How to get Recent Post From Each Category with Thumbnail?
- Plugin for visitors to edit content without logging in? [closed]
- How do I allow users to supply a photo/image to be used instead of the grey/white silhouette?
- help intercepting save_post through plugin