Hallo Zusammen,
gleich mal vorweg: Ich bin noch absoluter WordPress Neuling und hab leider nur grundlegende HTML und quasi keine PHP - Kenntnisse.
Derzeit benutze ich das Twenty Eleven Theme und ich konnte es eigentlich soweit schon an meine Bedürfnisse anpassen, z.B. wollte ich das alle Posts immer als Exzerpt angezeigt werden. Egal ob im Archiv, bei der Suche etc.
Klappt soweit auch wunderbar. Leider wird aber kein "Weiterlesen" Link angezeigt. Ich komm einfach nicht drauf woran es scheitert.
Der betreffende Part in der funtions.php sieht folgendermaßen aus
/**
* Returns a "Continue Reading" link for excerpts
*/
function twentyeleven_continue_reading_link() {
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'noch mehr <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>';
}
/**
* 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.
*/
function twentyeleven_auto_excerpt_more( $more ) {
return ' …' . twentyeleven_continue_reading_link();
}
add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
/**
* Adds a pretty "Continue Reading" link to custom post excerpts.
*
* To override this link in a child theme, remove the filter and add your own
* function tied to the get_the_excerpt filter hook.
*/
function twentyeleven_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
$output .= twentyeleven_continue_reading_link();
}
return $output;
}
add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
Alles anzeigen
Hat zufällig jemand ne Ahnung was ich da noch machen muss? Wollte eigentlich das "Noch mehr" für "Weiterlesen" angezeigt wird. Das ist aber wie gesagt noch nie angezeigt worden. Ich nutze WP-Version 3.1
Vielen Dank schon einmal für eure Hilfe