Forums
Forums / Plugin: Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin / add_action for comments
(@mvdo79)
8 years, 10 months ago
Hi, I am trying to create a custom tab for the comments post_type.
Is the following code correct anyone? :
$loop = $ultimatemember->query->make('post_type=comments&number=10&offset=0&user_id=' . um_profile_id() ); while ($loop->have_posts()) { $loop->the_post(); $post_ID = get_the_ID();
For now I created the code like this (I prefer to code the UM way but till then…):
<?php $args = array( 'user_id' => um_profile_id(), // use user_id ); $comments = get_comments( $args ); ?> <?php foreach ($comments as $comment) : ?>
etc…
The topic ‘add_action for comments’ is closed to new replies.
(@mvdo79)
8 years, 10 months ago
Hi, I am trying to create a custom tab for the comments post_type.
Is the following code correct anyone? :