create a read more link for post and archives
The docs have a page about how to create read more links Basic way: the_content( $more_link_text , $strip_teaser );
The docs have a page about how to create read more links Basic way: the_content( $more_link_text , $strip_teaser );
Use the excerpt with a custom read more link in functions.php add_filter( ‘excerpt_length’, ‘modify_excerpt_length’ ); function modify_excerpt_length( $length ) { return 15; } add_filter( ‘excerpt_more’, ‘your_excerpt_more’ ); function your_excerpt_more( $more ) { $more = sprintf( ‘ <a href=”https://wordpress.stackexchange.com/questions/341980/%s” class=”read-more” rel=”bookmark”>’ . __( ‘Read More’ ) . ‘</a>’, esc_url( get_permalink() ) ); return $more; } Or, … Read more
There are a few copies of ‘Read More’ in the files. I think the one you want is in template-parts/entry/entry-summary-footer.php. However if you look at the code that includes this in content-blog-horizontal: if ( sinatra_option( ‘blog_horizontal_read_more’ ) ) { get_template_part( ‘template-parts/entry/entry-summary-footer’ ); } there’s already a config option ‘Show Read More Button’ to turn this … Read more
I found the answer, I searched for <?php the_content(”); ?> and changed it to <?php the_content(‘Read More’); ?> These were found in each post types php file. eg includes/video.php.
It’s the first parameter to the_content(). the_content(‘Read some more of this post’); http://codex.wordpress.org/Function_Reference/the_content
You can add it back or add the tag manually. http://codex.wordpress.org/Quicktags_API
The excerpt_more filter only handles the linked text – not the link itself. Try: function new_excerpt_more( $more ) { return ‘<br/><br/>Read More’; } add_filter( ‘excerpt_more’, ‘new_excerpt_more’);
The more-Tag have a filter, you can enhance this with a small plugin like the follow example. <?php /** * Plugin Name: br after more-Tag * Description: Add content of var $extra_more after more-Tag * Version: 0.0.1 */ ! defined( ‘ABSPATH’ ) and exit; add_filter( ‘the_content_more_link’, ‘custom_more_link’, 9999 ); function custom_more_link( $more_link ) { $extra_more=”<br>”; … Read more
I found a solution on the WordPress forums, if anyone is trying to do the same thing here is the solution: http://wordpress.org/support/topic/custom-read-more-text-wrapped-in-a-div I added the following to my functions file: function wrap_readmore($more_link) { return ‘<div class=”post-readmore”>’.$more_link.'</div>’; } add_filter(‘the_content_more_link’, ‘wrap_readmore’, 10, 1); Thanks, Josh
Because of the way that wpautop works, I would expect that if you had a newline, or or maybe a space in your URL. I can’t seem to get a space or newline to save from the admin interface, but it is trivial to insert by editing the WP_HOME and WP_SITEURL constants into wp-config.php… but … Read more