From c4b2eb526c5733cc32b0550eb76fd072531e223c Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 17 Feb 2019 17:20:43 +0100 Subject: Creates custom post type and custom taxonomy and renders them correctly. --- functions.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 7553f43..8321d02 100644 --- a/functions.php +++ b/functions.php @@ -92,10 +92,12 @@ require get_template_directory() . '/taxonomy.php'; * Removes "Tag:" and "Category:" from archive pages. */ add_filter('get_the_archive_title', function ($title) { - if ( is_category() ) { - $title = single_cat_title( '', false ); - } elseif ( is_tag() ) { - $title = single_tag_title( '', false ); + + if ( is_tax('type') ) { + $title = single_term_title( '', false ); + $title = 'Aktuelle ' . $title . "-Angebote"; + } else { + $title = single_term_title( '', false ); } return $title; }); @@ -254,6 +256,12 @@ if ( ! function_exists("get_my_clean_title")) { } +/** + * Support for special offer pages. + */ +require_once __DIR__ . '/angebote/inc/functions.php'; +require_once __DIR__ . '/angebote/inc/template.php'; + /** * Removes emoji support. */ -- cgit v1.2.3