Skip to content

Commit

Permalink
Fix title trang archive
Browse files Browse the repository at this point in the history
  • Loading branch information
tuyenlq94 authored and rilwis committed May 8, 2024
1 parent 3e8c258 commit f984d41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Frontend/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ function auto_listings_listing_archive_get_title() {
} elseif ( is_post_type_archive( 'auto-listing' ) ) {
$page_id = auto_listings_option( 'archives_page' );
$page_title = get_the_title( $page_id );
} elseif ( is_tax() ) {
$current_term = get_queried_object();
$page_title = $current_term->name;
} else {
$page_title = get_the_title();
}
Expand Down

0 comments on commit f984d41

Please sign in to comment.