• Resolved MvdO79

    (@mvdo79)


    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();
Viewing 1 replies (of 1 total)
  • Thread Starter MvdO79

    (@mvdo79)

    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…

Viewing 1 replies (of 1 total)

The topic ‘add_action for comments’ is closed to new replies.