naweskil
10/27/2016 - 7:42 PM

Verifica o post type

Verifica o post type

<?php
/**
 *
 * Autor
 *
 */

$user_slug = get_the_author_meta( 'user_nicename' );
$user_url = home_url('author/') . $user_slug . '/?qd_type=qd_opportunity'; ?>
<a href="<?php echo $user_url; ?>"><?php echo get_the_author_meta( 'display_name' ); ?></a>
?>
$post_type = $_GET['qd_type'];
if ( $post_type == 'qd_opportunity' ) {
  global $wp_query;

  $args = array_merge( $wp_query->query_vars, array( 'post_type' => $post_type ) );

  query_posts( $args );
}