From 9a56fb16a63c03d437d4795de0d251b01a50355b Mon Sep 17 00:00:00 2001 From: Tolumba Date: Fri, 24 Nov 2017 11:40:17 +0200 Subject: [PATCH] FIX: Issue #20 Issue[#20](https://github.com/CherryFramework/cherry-projects/issues/20) --- .../includes/class-cherry-projects-template-callbacks.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/includes/class-cherry-projects-template-callbacks.php b/public/includes/class-cherry-projects-template-callbacks.php index c50ec4f..8a2fa4d 100644 --- a/public/includes/class-cherry-projects-template-callbacks.php +++ b/public/includes/class-cherry-projects-template-callbacks.php @@ -885,8 +885,11 @@ public function get_term_permalink( $attr = array() ) { $attr = wp_parse_args( $attr, $default_attr ); - $permalink = cherry_projects()->projects_data->cherry_utility->attributes->get_term_permalink( $this->term_data->term_id ); - + $permalink = get_term_link( $this->term_data->term_id, $this->term_data->taxonomy ); + if ( is_wp_error( $term_link ) ) { + $permalink = site_url(); + } + /** * Filter permalink text. *