Tagged: x
-
AuthorPosts
-
September 25, 2016 at 7:09 pm #1190086
cohen611ParticipantHi,
I have a custom page where users can go and see their own posts. I realize support for X does not include custom code, but I was wondering if this is something that can be done with either Essential Grid or The Grid. To clarify, I want to display only the current logged in user’s posts on a custom page in a grid format.
Thanks
September 25, 2016 at 8:03 pm #1190200
RadModeratorHi there,
Thanks for writing in.
That’s possible with Essential Grid plus custom query, like from here https://www.themepunch.com/faq/advanced-additional-parameters/
Then simply alter the parameters present at $query variable.
1. Get current user information ( https://codex.wordpress.org/Function_Reference/wp_get_current_user ), like this
$current_user = wp_get_current_user(); $author_ID = $current_user->ID;2. Then add author parameter on $query like this
if($grid_id == YOUR_GRID_ID) { $query['author'] = $author_ID; }Hope this helps.
September 26, 2016 at 1:32 pm #1191219
cohen611ParticipantThank you so much! It worked like a charm! Have a wonderful day ^_^
September 26, 2016 at 5:47 pm #1191497
DarshanaModeratorGlad we were able to help 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1190086 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
