add_filter('post_grid_layout_element_author_permalink', 'post_grid_layout_element_author_permalink_20200614', 10, 2); function post_grid_layout_element_author_permalink_20200614($post_link, $args){ $post_id = isset($args['post_id']) ? $args['post_id'] : ''; $download_url = get_field( "download_url", $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }