styled query to not show pre info in the_title
This commit is contained in:
parent
b193fbef4a
commit
05a2d54b64
|
@ -188,3 +188,14 @@ if ( defined( 'JETPACK__VERSION' ) ) {
|
||||||
* Functions to personalize login screen
|
* Functions to personalize login screen
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/login-functions.php';
|
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';
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Archive title customization.
|
||||||
|
* Get rid of the "Category:" "Tag:" "Author:" "Archives:" lables in
|
||||||
|
*
|
||||||
|
* https://developer.wordpress.org/reference/functions/get_the_archive_title/#comment-1807
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function ofisuport_archive_title( $title ) {
|
||||||
|
if ( is_category() ) {
|
||||||
|
$title = single_cat_title( '', false );
|
||||||
|
} elseif ( is_tag() ) {
|
||||||
|
$title = single_tag_title( '', false );
|
||||||
|
} elseif ( is_author() ) {
|
||||||
|
$title = '<span class="vcard">' . get_the_author() . '</span>';
|
||||||
|
} 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' );
|
Loading…
Reference in New Issue