We help IT Professionals succeed at work.

Check out this week's podcast, "Dairy Farms to Databases: Community's Hand in Technology"Listen Now

x

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

255 Views
Last Modified: 2018-01-05
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

Director, Information Systems
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

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
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

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
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

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
CERTIFIED EXPERT

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

Author

Commented:
You are welcome!

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.