Homepage › Community Forums › Epik Theme Support › Changing Read More Button in EPIK
Is there a way for me to customize the READ MORE BUTTON in EPIK’s portfolio so I can add “View Now” and “Listen Now” Sometimes I am featuring audio work and other times video work in the portfolio.
Yes, one, not both.
The change can easily be made in your Portfolio Page Template in your functions (page_portfolio.php). BE CAREFUL when doing this!
Look in this section:
/**
* Custom Read More link.
*
* @author Wes Straham
* @since 1.0.0
*/
function portfolio_read_more_link() {
return '<a class="more-link" href="' . get_permalink() . '" rel="nofollow">Read More</a>';
}
<!--formatted-->
The part
>Read More<
can be changed to something else, like “Continue…” or “More..”.
If you use “View More”, or “Listen Now” those terms will be on all boxes. So if some are for viewing, and others are for listening, you’ll need to come up with a fairly generic term (other than “READ”) to prompt the web visitor to continue on.
Changing the text works on ALL the portfolio in this example. I am sure there is a way to do it individually for every conceivable post type, but that is way beond the scope of this forum.
You might also try using the <!-more-> tag.
There’s a button for it in WordPress when you are editing a post… or, you can use this: <!–more–> wherever you want the “Read More” break to be. The “more” text can be changed to anything you want, as well.
Just make sure to keep the “more” spot at the beginning, add a space, and then type whatever you want, like this: <!–more But wait, there’s more!–>
You also might look at this:
http://wordpress.stackexchange.com/questions/63748/modify-read-more-link-adding-a-new-class
Thanks so much Andy, I’ll give it a go right away!
Mmm, I tried this while editing post and it still comes out “Read More” on the button in Portfolio http://bit.ly/1VBFv7S
<!–more Listen Now!–>
Here’s the full post text for the first position (top left) in Portfolio As you can see I have “Listen Now” but the button still reads “Read More”
<p>Methodist University – Professional MBA at Pinehurst – Enrollment <!–more Listen Now!–> Audio Production, Voice Casting, Voiceover <iframe src=”https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/237319232&color=0293b0&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false” width=”100%” height=”166″ frameborder=”no” scrolling=”no”></iframe></p>
This will not work. Check out the WordPress codex link for a full outline of what the “read more” tag is about.
<p>Methodist University – Professional MBA at Pinehurst – Enrollment <!–more Listen Now!–> Audio Production, Voice Casting, Voiceover <iframe src=”https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/237319232&color=0293b0&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false” width=”100%” height=”166″ frameborder=”no” scrolling=”no”></iframe></p><!--formatted--><!--formatted-->
From the link to your site, if you want to change the “READ MORE” in the button on ALL the portfolio boxes, you need to go into the THEME FUNCTIONS and change the text from “read more” to “Listen Now!”
It is in this section:
* Custom Read More link.
*
* @author Wes Straham
* @since 1.0.0
*/
function portfolio_read_more_link() {
return '<a href="' . get_permalink() . '" rel="nofollow">Read More</a>';
}
<!--formatted--><!--formatted-->
You are looking for the theme Portfolio page template. again….CAREFUL doing this.
Once changed, ALL the boxes will have “LISTEN NOW” instead of “READ MORE”
It is on line 54 of your page_portfolio.php Again be careful to type and change just the area between the > < and save.
Thank you, Andy. I was certain I replied to you awhile back, but do not see my response. As always I appreciate your feedback.
Caroline