Hi Edwin,
thanks!
Sounds like something in the Ultimatum theme functions is hooking into the WP excerpt and causing this.
You will need to reach out to those guys to help with that.
Alternatively I can provide a custom the_except hook if you want to implement yourself.
thnx, I already asked them. However, can you also provide this excerpt hook?
thnx for your quick reply 🙂
You could add this to your functions.php
// Trim Excerpt Length
function excerpt($limit) {
$excerpt = explode(' ', get_the_excerpt(), $limit);
if (count($excerpt)>=$limit) {
array_pop($excerpt);
$excerpt = implode(" ",$excerpt).'...';
} else {
$excerpt = implode(" ",$excerpt);
}
$excerpt = preg_replace('<code>[[^]]*]</code>','',$excerpt);
return '<p>'.$excerpt.'</p>';
}
And then call it like this in your templates.
echo excerpt(30);
Thanks a lot for the coding, I’ve added this to my functions.php.
However, I don’t understand what you mean with And then call it like this in your templates. echo excerpt(30);
Where you normally use the_excerpt();
use echo excerpt(30);
where 30 is the number of words to return
Sorry for giving the wrong info….now I see what’s going wrong… the problem with not showing the excerpts, are only with the preloaded posts that show via your add-on.
Is there a way to solve this?
That’s strange.
its getting the title and everything else?
Are you using the_excerpt()
Yep, the title and everything else is showing, the only difference is that preloaded posts don’t show excerpts while the other posts (after clicking Load more Posts) do.
I’ve excluded the script that you gave me because of the excerpts showing properly, except the preloaded posts.
Ill have to look into this later.
Maybe this will help you, I’m pretty sure that ‘not showing excerpts’ is only with regard to preloaded posts.
I’ve installed an excerpt plugin to see if it still excludes preloaded posts, and it does. Settings like naming ‘read more’ and amount of words only work for the posts that are shown after clicking ‘More Posts’.
Fyi, the plugin: Advanced Excerpt https://wordpress.org/plugins/advanced-excerpt/
Just tested with the_excerpt and its works as expected.
Hmm…it seems that the problem is partly solved – the excerpts are properly shown. However, clicking on an excerpt doesn’t show the actual post on a separate page anymore. Instead, it results into showing all full (no excerpts) posts, while the URL of the post that I’ve clicked, is shown correctly.
I hope you know what I mean?
Some additional info:
In a template, I don’t include a WP default loop, instead I use a page because your plugin creates this shortcode on a page.
In WP reading settings, I’ve set the Front page display to ‘Posts page’ and I’ve selected that page.
Hi Edwin,
No idea what you mean, sorry 🙂
The preloaded add-on uses the same repeater template as the ajaxed content so if there is an issue it would be in your repeater template.
Thnx for your reply, I think I was too vague about the problems. After testing, I’ve concluded that there is only one problem.
Clicking on a post doesn’t show the single post on a separate page. Instead, nothing happens, while the permalink of that post is shown correctly.
I really hope you know what I mean?