According to this page in the codex, https://codex.wordpress.org/Customizing_the_Read_More, I just need to add a certain function to the functions.php file to get it to work. I'm doing so in a child theme so updates to the main theme don't erase this coding. The problem is that every time I try, the functions.php stops working altogether. I'm not sure what I'm doing wrong or if there's something I'm missing.
This is the way the child looks before adding the code:
<?php
function my_theme_enqueue_styles() {
$parent_style = 'frontier-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
?>
Here's how it looks when I add the relevant code to the file.
<?php
function my_theme_enqueue_styles() {
$parent_style = 'frontier-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function modify_read_more_link() {
return '<a class="Read More" href="' . get_permalink() . '">There's still more to read. Click Here!</a>';
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );
?>
I copied and pasted that direction from the link I provided, so I'm not sure why it isn't working. I've also tried adding it as a separate php function and that doesn't work either.
modify_read_more_link()
the apostrophe in there's needs to be escaped:return '<a class="Read More" href="' . get_permalink() . '">There\'s still more to read. Click Here!</a>';