Insert 'read more' within brackets on posts on home page

nsitedesigns
nsitedesigns used Ask the Experts™
on
I am using a new wordpress template called Smartline Lite by ThemeZee for this site:
http://plymouthpubliclibrary.net/

Does anyone know how to modify so that the brackets that appear on posts on the home page have more than [...]

I would like it to say something like [ read more]    I checked everyone and could not find how to modify this setting.
Here is a screenshot:

https://screencast.com/t/Qa7HfFZVW
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Director, Information Systems
Commented:
This purports to be a solution to your problem.  The only difference would be to replace the elipsis with your text.

function new_excerpt_more($more) {
    return '[read more]';
}
add_filter('excerpt_more', 'new_excerpt_more');

Open in new window

Author

Commented:
I could not find the original code to replace as referenced in the http://www.ronvangorp.com/how-to-change-wordpress-excerpt-ellipsis/ article.  I have attached my functions file.  Am I missing it?  I am not  used to this coding so maybe it is there but I am not seeing it?  I did check a number of times.
functions.php
Paul MacDonaldDirector, Information Systems
Commented:
"I could not find the original code to replace..."
The article says to add the code to the functions.php file.  I presume the add_filter bit causes this code to override the excerpt_more function.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Author

Commented:
My mistake.  I grabbed the second code set (I liked that one better) and put it in my functions file but it didn't make a difference.   I even tried viewing in new private window.  No change.  I attached my functions file.  New code is at the top. Maybe I didn't put this in the right place?  I don't really mess around with php.

function new_excerpt_more($more) {
  return ' <a class="read-more" href="' . get_permalink( get_the_ID() ) . '">Read More</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');

Open in new window

Paul MacDonaldDirector, Information Systems
Commented:
I'm not conversant with PHP either, frankly.  I would suggest moving the new code to the bottom of the file however, as it appears to try to replace a call that already exists.  The new code may not work if it fires before the old code it replaces.

Author

Commented:
That worked!  I put the code at the bottom of the functions file and added a <br> so that the Read More appears on second line.  Not sure if that  is considered ok to do in php but it seems to work!

Author

Commented:
function new_excerpt_more($more) {
  return ' <a class="read-more" href="' . get_permalink( get_the_ID() ) . '"><br>Read More</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');

Open in new window

Author

Commented:
thanks!
Paul MacDonaldDirector, Information Systems

Commented:
Very happy to help, and thanks for the points.

Author

Commented:
You are welcome!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial