WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Title tag (6 posts)

  1. hanimausi
    Member
    Posted 3 years ago #

    Hello,

    if I search with Relevanssi, Title tag shows like:
    <title>Suchergebnisse google</title>

    How I can remove "Suchergebnisse" which in german means "Search Results".
    I want that the title tag only shows the search phrase.
    Tanks!

  2. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    The title comes from your search results template, edit that.

  3. hanimausi
    Member
    Posted 3 years ago #

    Hello,

    in my templates 1 only have 2 search files:

    search.php:

    <?php get_header(); ?>
    <div id="wrapper">
    <div id="content">

    <?php if (have_posts()) : ?>
    <h1 class="pagetitle"><?php the_search_query() ?></h1>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post">
    <p><h2 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2></p>

    <div class="entry">
    <?php the_excerpt() ?>
    </div>

    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Vor') ?></div>
    <div class="alignright"><?php previous_posts_link('Zurück »') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Kein Ergebnis</h2>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>
    <div style="clear: both;"> </div>
    </div>
    <?php get_footer(); ?>

    searchform.php:
    <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Suchen" />
    </div>
    </form>

    Where I should edit the "search results template"?

  4. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Title is part of the header. Looks like that is not set in your search results template, but in the header template.

  5. hanimausi
    Member
    Posted 3 years ago #

    Hello msaari,

    here is my header.php but I can't nothing see about search results:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_head(); ?>
    </head>
    <body>

    <div id="page">
    <div id="header">
    <div style="float: right; padding-top: 10px;">
    </div>
    <h1>"><?php bloginfo('name'); ?></h1>
    <h2><?php bloginfo('description'); ?></h2>
    </div>

    <div id="menu">

      <li class="<?php if (is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>">
      <?php wp_list_pages('title_li=&depth=1'); ?>

    </div>

  6. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Looks like it comes from wp_title() function. That makes it a lot more complicated to fix, and unfortunately I don't have the time to figure out a solution for you. Ask your theme developer.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags