Plugin:Read More Right Here , How to change the name (more…) to Read More
Add this to your functions.php file: function new_excerpt_more( $more ) { return ‘Read More’; } add_filter(‘excerpt_more’, ‘new_excerpt_more’);
Add this to your functions.php file: function new_excerpt_more( $more ) { return ‘Read More’; } add_filter(‘excerpt_more’, ‘new_excerpt_more’);
Modify the callback and check the post category: function excerpt_read_more_link( $output ) { global $post; if ( in_category( ‘news’, $post ) ) return $output . ‘<a href=”‘. get_permalink( $post->ID ) . ‘”>more</a>’; return $output; } And you should prefix the function name. In its current form it is not safe enough.
Not sure if this is what you looking for… To display excerpt of specific page, you can use this code: <?php $post_id = 2; // substitute to your page id $my_post = get_post($post_id); echo “<p>$my_post->post_excerpt</p>”; echo ‘<a href=”‘.get_permalink( $post_id ).'”>read more</a>’; ?>
It sounds like your theme is using the_excerpt() instead of the_content() when displaying the post. If you want to display the full post you’ll need to edit your index.php file to use the_content() instead.
Not sure why this was so hard to answer, but after more research & playing around I have found the answer – for anyone else that is wondering, you just use wp_more in any of the theme_advanced_buttons indices.
You could add a link manually like: <a href=”https://wordpress.stackexchange.com/questions/88976/<?php echo get_permalink($post->ID) ?>”>Read More…</a> If you want to add the link at the end of the content you could do: return implode(‘ ‘, array_slice($words, 0, $word_limit)) . ‘<a href=”‘.get_permalink($post->ID).'”>Read More…</a>’;
In your index.php or front-page.php (if any): Find the_excerpt() Replace with the_content() I din’t check the Nexus theme. If you are unable to find the_excerpt(), then try locating any custom function within the loop: while ( have_posts() : the_post() ) and endwhile.
function excerpt($limit) { $excerpt = explode(‘ ‘, get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(” “,$excerpt).’…’; } else { $excerpt = implode(” “,$excerpt); } $excerpt = preg_replace(‘`\[[^\]]*\]`’,”,$excerpt); return $excerpt; } write below code in your template. <?php echo excerpt(25); ?>
Are you aware of the uses of the More Tag? Customizing the Read More shows many uses of variable length teasers with variable link phrases to read more. For example, this markup entered in the Post editor will provide a link with Read the rest of this story in the anchor text. <!–more Read the … Read more
Use get_permalink. Otherwise this is basically a PHP string concatenation question. the_content(‘<a href=”‘.get_permalink().'” class=”button”>Read More</a>’);