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

Added conditional statement to get_field on search page #143

Merged
merged 1 commit into from Jul 18, 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
3 changes: 2 additions & 1 deletion search.php
Expand Up @@ -21,7 +21,8 @@ get_header(); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post();?>
<?php
$url = get_field('external_url');
$url = '';
if(function_exists('get_field')) $url = get_field('external_url');
if( empty($url) ){
$url = '<a href="'.get_permalink().'">';
}else{
Expand Down