You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ÄNDRINGAR I KODEN PÅ SEARCH OCH INDEX.PHP I BP-PORTALEN
mkniped->wordpress->wp-content->themes->bp-portalen->search.php
RAD 35:
<div class="entry">
<?php
if ( is_search() ) {
the_excerpt();
} else {
the_content( __( 'Read the rest of this entry ?', 'buddypress' ) );
}
?>
wordpress->wp-content->themes->bp-portalen->index.php
RAD 37:
<?php
if ( is_home() ) {
the_excerpt();
} else {
the_content( __( 'Read the rest of this entry ?', 'buddypress' ) );
}
?>
För att ändra hur många tecken excerpt(hur lång sammanfattningen ska vara) ska ha får man skapa functions.php och lägga i themes - > buddypress. Om man vill har read more länk tex Mer…. så läggs den också in där enligt nedan.
<?php
function custom_excerpt_length( $length ) {
return 40;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
function new_excerpt_more($more) {
global $post;
return ' <a href="'. get_permalink($post->ID) . '">Mer...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
?>