Skip to content
This repository has been archived by the owner. It is now read-only.

check for post_type='post', remove check for post_type='person' #5

Merged
merged 1 commit into from Apr 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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