diff --git a/kit/css/search.css b/kit/css/search.css index 70cb5aa..b935ad2 100644 --- a/kit/css/search.css +++ b/kit/css/search.css @@ -59,7 +59,7 @@ } .tx-indexedsearch .tx-indexedsearch-browsebox { - margin-top: 15px; + margin-top: 40px; } .tx-indexedsearch .tx-indexedsearch-browsebox > * + * { @@ -117,7 +117,7 @@ } .tx-indexedsearch .tx-indexedsearch-res .link-more span::after { - content: url(img/arrow-right-grey.svg); + content: url(../img/arrow-right-grey.svg); position: absolute; width: 17px; margin-left: 10px; @@ -131,3 +131,7 @@ h2.screen-reader-text { display: none; } + +.tx-indexedsearch-res p { + margin: 0.2rem 0; +} diff --git a/kit/functions.php b/kit/functions.php index 383bd0b..ef7425e 100644 --- a/kit/functions.php +++ b/kit/functions.php @@ -214,6 +214,10 @@ function kit_customize_css() color: ; } + .tx-indexedsearch .tx-indexedsearch-browsebox ul li .current { + background-color: ; + } + .nav-second-level-group-headline .icon { background-color: ; } @@ -259,3 +263,16 @@ function kit_modify_posts_per_page( $query ) { } } add_action( 'pre_get_posts', 'kit_modify_posts_per_page' ); + + +function highlight_results($text) { + if (is_search() && !is_admin()) { + $sr = get_query_var('s'); + $keys = explode(' ', $sr); + $keys = array_filter($keys); + $text = preg_replace('/('.implode('|', $keys) .')/iu', '\0', $text); + } + return $text; +} +add_filter('the_excerpt', 'highlight_results'); +add_filter('the_title', 'highlight_results'); diff --git a/kit/search.php b/kit/search.php index 34ec8a0..c13e2ef 100644 --- a/kit/search.php +++ b/kit/search.php @@ -40,6 +40,7 @@ get_header(); + @@ -49,13 +50,25 @@ get_header();
1 bis 10 von insgesamt " . $wp_query->found_posts. ""; + $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; + $post_start = ($wp_query->found_posts - $wp_query->post_count); + echo "Anzeige der Ergebnisse " . $post_start . " bis " . $wp_query->post_count . " von insgesamt " . $wp_query->found_posts. ""; ?>
- - +