• Hallo !

    Bräuchte etwas hilfe möchte das nur die Titel von jeden Post angezeigt werden und sobald man auf denn Titel klickt zum eigentlichen Post weitergeleitet wird.
    bisher habe ich nur heraus gefunden das mann über die content.php

    PHP
    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
            <div class="entry-summary">
                <?php the_excerpt(); ?>
            </div><!-- .entry-summary -->
            <?php else : ?>
            <div class="entry-content">
        hier in excerpt !! -->  <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
                <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
            </div><!-- .entry-content -->
            <?php endif; ?>

    ändert, zwar nur der Titel angezeigt wird aber auch nur wenn im Post selber der more Tag "Continue reading" eingefügt wird.

    hoffe könnt mir helfen, so könnte ich die seite was übersichtlicher gestalten.

    grüße matze

    Einmal editiert, zuletzt von Matze123 (16. Dezember 2012 um 11:33)

    • 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

  • Hallo Bambaataa,

    danke erstmal wollte jetzt nicht direct code entfernen,
    aber habe gerade mal in der functions.php nachgeschaut, da habe ich das hier gefunden..

    PHP
    function twentyeleven_auto_excerpt_more( $more ) {
        return ' &hellip;' . twentyeleven_continue_reading_link();
    }
    add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );

    als beschreibung steht da ..

    PHP
    /**
     * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
     *
     * To override this in a child theme, remove the filter and add your own
     * function tied to the excerpt_more filter hook.
     */

    bedeutet das es wird automatisch in jeden post read more bzw. eingefügt ?
    In verbindung mit oben würde es genau das bewirken was brauche,
    und wenn ja wie wende ich das an, sorry falls das wie blöde frage klingt aber bin noch beim lernen :)

    !matze

  • Wenn man the_excerpt anstatt von the_content nutzt, wird ein read-more eingefügt, das ist soweit richtig.

    Was ich nicht verstehe ist, Du willst das Aussehen Deiner Seiten ändern, aber nichts am Theme ändern? Dann wird das nichts. Mach Dir lokale Kopien von den Dateien die Du änderst. So kannst Du verschiedenen Dinge testen und wenn was schief geht, das Original per FTP wieder hochladen.

    Das Geheimnis des Könnens liegt im Wollen!
    [size=12]Bitte keine Hilfegesuche per PN (auch keine "privaten" Links). Das ist ein öffentliches Forum.[/SIZE]

  • Ein backup der dateien habe ich, ich ändere aber alles live, sobald aber merke das mich verdatert habe spiele ich das letzte funktionierende backup wieder ein.
    Das Theme veränder ich schon, möchte jetzt nur nicht gleich ein komplett neues.

  • dann muss the_content(); bzw. the_excerpt(); ganz raus und eben nur noch the_title(); dort sein wo Du es eben so haben möchtest.


    Dann probiere es doch aus...

    Wenn Du nur die Überschriften willst und sonst nichts, dann versuch es so:

    PHP
    [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]if ( [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]is_search[/FONT][/COLOR][COLOR=#007700][FONT=monospace]() ) : [/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]// Only display Excerpts for Search [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace]        <div class="entry-summary">[/FONT][/COLOR]
    [COLOR=#0000BB][FONT=monospace]<?php the_excerpt[/FONT][/COLOR][COLOR=#007700][FONT=monospace](); [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace]        </div><!-- .entry-summary -->[/FONT][/COLOR]
    [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]else : [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace]        <div class="entry-content">[/FONT][/COLOR]
    [COLOR=#0000BB][FONT=monospace]<?php the_title[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ; [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]<?php wp_link_pages[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( array( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'before' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]=> [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'<div class="page-link"><span>' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]. [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]__[/FONT][/COLOR][COLOR=#007700][FONT=monospace]( [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'Pages:'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'twentyeleven' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) . [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'</span>'[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'after' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]=> [/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]'</div>' [/FONT][/COLOR][COLOR=#007700][FONT=monospace]) ); [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>
    [/FONT][/COLOR][COLOR=#000000][FONT=monospace]        </div><!-- .entry-content -->[/FONT][/COLOR]
    [COLOR=#0000BB][FONT=monospace]<?php [/FONT][/COLOR][COLOR=#007700][FONT=monospace]endif; [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]?>[/FONT][/COLOR]

    Das Geheimnis des Könnens liegt im Wollen!
    [size=12]Bitte keine Hilfegesuche per PN (auch keine "privaten" Links). Das ist ein öffentliches Forum.[/SIZE]

  • Dann probiere es doch aus...

    Ich denke so wird er den Titel zweimal angezeigt bekommen. Den der Code ist eigentlich nur für den Inhalt. Der Titel wird vorher schon irgendwo ausgelesen.

    Im Prinzip kann alles von [COLOR=#000000]<div class="entry-content"> bis zum schließenden Div weg. Es sei den er möchte die vor und zurück links behalten.[/COLOR]

  • habe nun das entfernt

    PHP
    <?php else : ?>
            <div class="entry-content">
                <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
                <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
            </div><!-- .entry-content -->

    danke euch für die hilfe :)

    !matze123

Jetzt mitmachen!

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