Skip to content

Commit

Permalink
fix: single taxonomy archive page title issue for yoast seo plugin (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MahfuzulAlam authored Apr 1, 2024
1 parent a0a727c commit 91cf59c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/classes/class-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ public function wpseo_title($title, $id = null)
if (array_key_exists('wpseo_focuskw', $meta['at_biz_dir-category'][$term->term_id])) {
$replacements['%%term_title%%'] = $meta['at_biz_dir-category'][$term->term_id]['wpseo_focuskw'];
}

if (array_key_exists('wpseo_title', $meta['at_biz_dir-category'][$term->term_id]) && !empty($meta['at_biz_dir-category'][$term->term_id]['wpseo_title'])) {
$title_template = $meta['at_biz_dir-category'][$term->term_id]['wpseo_title'];
}
}
}
}
Expand Down Expand Up @@ -437,6 +441,10 @@ public function wpseo_title($title, $id = null)
if (array_key_exists('wpseo_focuskw', $meta['at_biz_dir-location'][$term->term_id])) {
$replacements['%%term_title%%'] = $meta['at_biz_dir-location'][$term->term_id]['wpseo_focuskw'];
}

if (array_key_exists('wpseo_title', $meta['at_biz_dir-location'][$term->term_id]) && !empty($meta['at_biz_dir-location'][$term->term_id]['wpseo_title'])) {
$title_template = $meta['at_biz_dir-location'][$term->term_id]['wpseo_title'];
}
}
}
}
Expand Down Expand Up @@ -464,6 +472,10 @@ public function wpseo_title($title, $id = null)
if (array_key_exists('wpseo_focuskw', $meta['at_biz_dir-tags'][$term->term_id])) {
$replacements['%%term_title%%'] = $meta['at_biz_dir-tags'][$term->term_id]['wpseo_focuskw'];
}

if (array_key_exists('wpseo_title', $meta['at_biz_dir-tags'][$term->term_id]) && !empty($meta['at_biz_dir-tags'][$term->term_id]['wpseo_title'])) {
$title_template = $meta['at_biz_dir-tags'][$term->term_id]['wpseo_title'];
}
}
}
}
Expand Down

0 comments on commit 91cf59c

Please sign in to comment.