Viewing 5 posts - 1 through 5 (of 5 total)
-
morykwasParticipant
Daniel Tara, I really would appreciate your help!
Here’s our website…We’re using a child theme of Pinboard, which is very popular with visitors. The only problem is that no text link appears after a Read More tag. I want it to say “Click here to read more” or something like that.
Any suggestions?
Ed Morykwas
School Life TroyDaniel TaraKeymasterTry adding this functions to functions.php:
add_filter( 'the_excerpt', 'pinboard_excerpt_read_more' ); function pinboard_excerpt_read_more( $excerpt ) { return str_replace( '</p>', ' <a href="' . get_permalink() . '" rel="bookmark">Read More →</a></p>', $excerpt ); }
morykwasParticipantThank you, sir, for your help.
Unfortunately those lines had no effect when I pasted them into functions.php.
Is there something else I can do?function child_scripts_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css', array() ); } add_action( 'wp_enqueue_scripts', 'child_scripts_styles' ); add_filter( 'the_excerpt', 'pinboard_excerpt_read_more' ); function pinboard_excerpt_read_more( $excerpt ) { return str_replace( '', ' <a href="' . get_permalink() . '" rel="bookmark">Read More →</a>', $excerpt ); }
Daniel TaraKeymasterSorry, I made a typo in the code above. Here is the correct code:
add_filter( 'the_excerpt', 'pinboard_excerpt_read_more' ); function pinboard_excerpt_read_more( $excerpt ) { return str_replace( '</p>', ' <a href="' . get_permalink() . '" rel="bookmark">Read More →</a></p>', $excerpt ); }
Viewing 5 posts - 1 through 5 (of 5 total)
Tagged: pinboard theme, Read More tag
You must be logged in to reply to this topic.