At our support channel, we strive to provide the best assistance to our users, ensuring they can fully utilize our plugins. Recently, one of our users reached out with a unique requirement for the Posts Table Pro plugin. They needed to display posts in a table where admin users could see all posts, but regular users could only see their own posts. This task, although straightforward for someone with coding knowledge, posed a challenge for our user. Here’s how we went the extra mile to help them.
INSTANT TABLES OF YOUR WORDPRESS CONTENT
Posts Table Pro lists posts, pages, custom post types, custom fields, taxonomies, and more. All easily, all automatically.
The User’s Requirement
The user wanted to apply a condition to the Posts Table Pro plugin such that:
- Admin users could see all posts.
- Regular users could see only their own posts.
Our documentation included a code snippet to show posts based on the current user, but it required some coding knowledge to implement. The user wasn’t comfortable with coding, so they sought help from a service like Codable, which quoted them $140 for the customization.
The User’s Initial Frustration
When the user came to us, they were already frustrated and anticipated that we might also direct them to hire a developer. They had a pre-determined notion that our support would not be able to assist beyond a certain point. However, I am committed to going above and beyond to help our users.
Our Solution
Understanding the user’s need and their discomfort with coding, I decided to take a hands-on approach. Here’s the step-by-step solution I provided:
- Identify the Current User: First, we need to determine the role of the logged-in user. If the user is an admin, they should see all posts. If they are not an admin, they should only see their own posts.
- Modify the Shortcode: Based on the user’s role, we modify the shortcode for the Posts Table Pro plugin to either show all posts or only the posts authored by the current user.
Here’s the customized code snippet I provided:
<?php
$user_id = get_current_user_id();
$user = wp_get_current_user();
$roles = ( array ) $user->roles;
if ( in_array( 'administrator', $roles ) ) {
echo do_shortcode('[posts_table id="1"]');
} else {
echo do_shortcode('[posts_table id="1" author="' . $user_id . '"]');
}
?>
This code checks the current user’s role. If the user is an administrator, it displays all posts using the [posts_table id="1"]
shortcode. If the user is not an administrator, it displays only the posts authored by the current user using the [posts_table id="1" author="' . $user_id . '"]
shortcode.
Implementation
I went ahead and implemented this code for the user directly in their WordPress environment. This hands-on approach ensured that the user didn’t have to deal with any technical complexities or additional costs.
The Result
The user was extremely satisfied with the quick and effective resolution. They appreciated that they didn’t have to spend extra money or time to get the desired functionality. The user was not only happy with the outcome but also pleasantly surprised by the level of support they received.

Going the Extra Mile
This experience highlights our commitment to customer satisfaction. While many support teams might have directed the user to external developers, we chose to solve the problem internally. By going the extra mile, we saved our user time and money, and more importantly, provided a solution that worked seamlessly with their existing setup.
Conclusion
At our support channel, we understand that not every user is comfortable with coding or has the resources to hire a developer. That’s why we strive to provide comprehensive support and practical solutions. This incident is a testament to our dedication to helping users make the most of our plugins. Whether you’re a coding novice or an experienced developer, we’re here to ensure your experience with our products is as smooth and productive as possible.
Leave a Reply