Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request weblab#5 from jjc16105/master
check for post_type='post', remove check for post_type='person'
  • Loading branch information
jmr06005 committed Apr 20, 2016
2 parents ce107ef + 8153a04 commit a12d9ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions search.php
Expand Up @@ -24,13 +24,13 @@ get_header(); ?>

$post = get_post( get_the_ID() );

// is this a 'person' or a 'page' post type?
$is_person_post_type = ( $post->post_type == "person" );
// is this a 'post' type?
$is_post_type = ( $post->post_type == "post" );

$url = get_field('external_url');
if( !empty($url) ){
$url = '<a href="'.$url.'" target="_blank">';
}elseif(strlen(get_the_content()) > 0 || $is_person_post_type){
}elseif( (strlen(get_the_content()) > 0 ) || ( ! $is_post_type )){
$url = '<a href="'.get_permalink().'">';
}

Expand Down

0 comments on commit a12d9ff

Please sign in to comment.