Tag Info

New answers tagged

1

Query for post type listing_type and author ID within your loop: $args = array( 'post_type' => 'listing_type', 'author' => get_the_author_meta( 'ID' ) ); $listing_post = new WP_Query( $args ); if( $listing_post->have_posts() ){ while( $listing_post->have_posts() ){ $listing_post->the_post(); the_permalink(); } ...


0

My bad. Should have added a foreach for the replies as well. <?php $args = array( 'user_id' => $curauth->ID, 'number' => 5, 'status' => 'approve', 'parent' => 0 ); $comments = get_comments($args); if ( $comments ) { foreach($comments as $c){ echo '<ul ...


0

Here is a sophisticated way of creating the social links and then retrieving them back where you need using a simple function. You can use this function to create a shortcode too. (I copied the code from one of my project, so you might want to change some of the class prefixes if you like). /*-----------------------------------------------------------*/ ...


1

The function you are using, get_most_recent_post_of_user, won't work as it only retrieves the latest post from the author. It cannot retieve a list of posts Walks through each of a user's blogs to find the post with the most recent post_date_gmt. You will most probably be better of using either WP_Query or get_posts to achieve this. You should first ...



Top 50 recent answers are included