Bestimmten Permalink auf NoFollow setzen möglich?

  • Die Überschrift "Impressum" ist gleichzeitig ein Permalink und ist nicht auf NoFollow gesetzt. Gemeint ist diese Seite hier:

    http://meintestonline.de/impressum/

    Meine Permalinkstruktur ist folgendermaßen aufgebaut.

    PHP
    <?php the_post();?>
    
    
    <h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_title(); ?></a></h1>

    Ich hätte jetzt hier die Möglichkeit alle Permalinks auf NoFollow setzen. Doch wie kann ich nur den Impressumspermalink auf NoFollow setzen?

    Oder ist es sogar sinnvoll alle Permalinks auf NoFollow zu setzen wegen Duplicate Content (google)?

    Vielen Dank :-)

    • 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

  • Als Anregung, wie es gehen könnte:

    PHP
    <?php the_post();?>
    
    
    <h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"<?php if $post->post_title=="Impressum" echo ' rel="nofollow"'?>> <?php the_title(); ?></a></h1>
  • PHP
    <?php if ($post->post_title="Impressum") {echo 'rel="nofollow' ;} else {echo 'rel="nofollow';} ?>"> </a></h1>


    Mit der Else Abfrage hab ich es auf NoFollow bekommen^^

    Allerdings sind jetzt alle Überschriften auf allen Seiten verschwunden :D

    Einmal editiert, zuletzt von drucg2 (14. Januar 2011 um 02:10)

  • War spät gestern, aber bei dir sind noch mehr Fehler drin als bei mir :-)

    So geht's:

    PHP
    <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"<?php if ( $post->post_title=='Impressum' ) {echo ' rel="nofollow"';} ?>><?php the_title(); ?></a></h1>
  • Ich dachte schon das war Absicht, aber ist ok, hab jetzt dadurch angefangen nochmal grundlegend php zu lernen^^
    .............................................................

    Danke, das bringt mich schonmal weiter :)

    Allerdings funktioniert das nur wenn ich rel "bookmark" ganz rausnehme. Ansonsten ist der Impressum Permalink noch DoFollow.

    Meine Variante sah so aus:

    PHP
    <?php if ($post->post_title=='Impressum') 
    
    
    {echo "<a href=\"<?php the_permalink(); ?>\" rel=\"nofollow\">Impressum</a>" ;}


    Wenn ich aber statt Impressum

    PHP
    <?php the_title(); ?>

    eingebe, dann geht es komischerweise nicht mehr, d.h. die anderen Seitentitel kann ich damit nicht ausgegeben.

Jetzt mitmachen!

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