Avatar of nsitedesigns
nsitedesigns
Flag for United States of America asked on

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

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
Web Development* ResponsiveResponsive WebWordPress

Avatar of undefined
Last Comment
nsitedesigns

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Paul MacDonald

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
nsitedesigns

ASKER
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
SOLUTION
Paul MacDonald

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
nsitedesigns

ASKER
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

SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
nsitedesigns

ASKER
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!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
nsitedesigns

ASKER
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

nsitedesigns

ASKER
thanks!
Paul MacDonald

Very happy to help, and thanks for the points.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
nsitedesigns

ASKER
You are welcome!