From 05a2d54b6413c8033c2b54d9d052cdb994a14cb0 Mon Sep 17 00:00:00 2001 From: jorge-vitrubio Date: Wed, 28 Dec 2022 20:50:12 +0100 Subject: [PATCH] styled query to not show pre info in the_title --- functions.php | 11 +++++++++++ inc/archive-title.php | 26 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 inc/archive-title.php diff --git a/functions.php b/functions.php index decda32..165dad9 100644 --- a/functions.php +++ b/functions.php @@ -188,3 +188,14 @@ if ( defined( 'JETPACK__VERSION' ) ) { * Functions to personalize login screen */ require get_template_directory() . '/inc/login-functions.php'; + +/** + * Functions to personalize the_archive_title() function + */ + +require get_template_directory() . '/inc/archive-title.php'; + +/** + * Functions to add guttemberg editor style + */ +//require get_template_directory() . '/inc/guttemberg-editor-style.php'; diff --git a/inc/archive-title.php b/inc/archive-title.php new file mode 100644 index 0000000..7eb53d5 --- /dev/null +++ b/inc/archive-title.php @@ -0,0 +1,26 @@ +' . get_the_author() . ''; + } elseif ( is_post_type_archive() ) { + $title = post_type_archive_title( '', false ); + } elseif ( is_tax() ) { + $title = single_term_title( '', false ); + } + + return $title; +} + +add_filter( 'get_the_archive_title', 'ofisuport_archive_title' );