Titel der Tags bei der Tag-Ansicht

  • Hallo, was muss ich in diesen Code einfügen damit der Titel des angeklickten Tags angezeigt wird?

    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <?php echo tag_description();?>
    <h2 class="pageTitle">Stichwort ‘<?php single_tag_title(); ?>’</h2>

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • mit tag-seiten meine ich meineseite.de/tag/stichwort/
    den code den ich am anfang gepostet hatte, war von archiv.php
    also hier ist der code von tag.php

  • abhaengig davon, ob der tag titel vor oder nach dem adsense angezeigt werden soll, diesen code:

    PHP
    <h2 class="pageTitle">Stichwort ‘<?php single_tag_title(); ?>’</h2>


    entweder hier einfuegen:

    PHP
    <div id="contentwrapper"><div id="content">
    <h2 class="pageTitle">Stichwort ‘<?php single_tag_title(); ?>’</h2>
    <div class="adsense_top"><?php include (TEMPLATEPATH . '/adsense_top.php'); ?></div>


    oder hier einfuegen:

    PHP
    <div class="adsense_top"><?php include (TEMPLATEPATH . '/adsense_top.php'); ?></div>
    <h2 class="pageTitle">Stichwort ‘<?php single_tag_title(); ?>’</h2>
    <?php query_posts($query_string  . "&posts_per_page=100"); if (have_posts()) : ?>
  • Funktioniert Perfekt vom Optischen, doch validator.w3.org gibt mir jetzt folgende Meldung:

    Sorry, I am unable to validate this document because on line 106 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
    The error was: utf8 "\x92" does not map to Unicode


    Irgendetwas wird nicht verstanden. Kann es sein, dass im Code Fehler sind? Habe vorher eine saubere (Passed) Seite gehabt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!