I am trying to: Have a "continue reading" link appear automatically after my excerpt
I visited this URL:
I expected to see:
Instead, I got: I am using the insert method for adding an excerpt to my view, and i add in my prefferred text "continue reading" and select the number of characters 200, and the following shortcode gets added to me view:
[wpv-post-excerpt length="200" more="...continue reading"]
but no "...continue reading" link gets appended to my excerpt 🙁
Is there something i need to add in my functions.php file for this to work as expected?
thank you in advance of your help.
Maybe i misunderstood how they shoudl work. I now see the "...continue reading" text IS appearing, but only for posts where i have not entered a custom excerpt. I have two questions about this:
1) Why is the "continue reading" text not a link? It is only text, which seems strange to me....
2) Is there a way to have the ellipses appear after my custom excerpts as well? I know i can add a url myself, but it always appears on a new paragraph from the excerpt, which i don't want.
thanks in advance for helping em to underntand...
If you use [wpv-post-excerpt] it will, following your settings, display either Content from the WordPress actual excerpt or, if that is not existent, from the Post Body.
To display a link to the Post, a "Continue reading", or "read more" link, you can use this below code:
[wpv-post-excerpt length='10']<a href="[wpv-post-url]">Continue reading</a>
To display that Link ONLY if there actually is a excerpt to display, you can use a wpv-conditional:
[wpv-conditional if="( '[wpv-post-excerpt]' ne '' )"][wpv-post-excerpt length='10']<a href="[wpv-post-url]">Continue reading</a>[/wpv-conditional]
Please let me know if the above solution works for you, I look forward to your reply!
Thank you for your patience.
Hi Beda,
Thanks so much for your reply!
I was using your first suggestion already, but my problem is that it always puts the "continue reading "on a new line, and i prefer it to come directly after the excerpt text. So for example, i want it to look like this:
This is my pretend excerpt text that i am using only as an example... continue reading
and NOT like this:
This is my pretend excerpt text that i am using only as an example
... continue reading
Is this possible?
What about the below. way easier and better:
[wpv-post-excerpt length='5' count='word' more='[wpv-post-link]']
OR
[wpv-post-excerpt length='5' count='word' more='<a href="[wpv-post-url]">Read more</a>']
Please let me know if the above solution works for you, I look forward to your reply!
Thank you for your patience.
Hi Beda - I really like the second new solution you suggested here - it works great with word count. Is there any way it can work with character count? I tried the following versions but they didn't work:
[wpv-post-excerpt length='200' count='character' more='<a href="[wpv-post-url]">Read more</a>']
[wpv-post-excerpt length='200' count='characters' more='<a href="[wpv-post-url]">Read more</a>']
[wpv-post-excerpt length="200" count='character' more='<a href="[wpv-post-url]">Read more</a>']
[wpv-post-excerpt length="200" count='characters' more='<a href="[wpv-post-url]">Read more</a>']
Can it only be done this way with word count?
Please use the GUI we provide in Toolset to achieve your goals.
Edit the ShortCodes manually is only suggested in very few situations.
We have coded a self-explanatory (almost) GUI, that lets you add Types, Views and Other Data from within the Editor GUI/Button Console
See the attached ScreenShot
The correct code for this (character count) is like this:
[wpv-post-excerpt length='10' more='<a href="[wpv-post-url]">Read more</a>']
Please let me know if the above solution works for you, I look forward to your reply!
Thank you for your patience.
OK. I did not realize i could simply include HTML in the GUI box. This explains why my "continue reading" text was not a link in the first question of my second post.