Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing excerpt of last 3 global posts stopped working #1

Open
Eskeemo opened this issue Jun 26, 2019 · 0 comments
Open

Showing excerpt of last 3 global posts stopped working #1

Eskeemo opened this issue Jun 26, 2019 · 0 comments

Comments

@Eskeemo
Copy link

Eskeemo commented Jun 26, 2019

I've been using this plugins for years to show the latest three posts from the network on the homepage of the main site. But somehow showing the excerpt of each posts stopped working. It still shows the correct title and date, but for each post it shows the same excerpt.

So far the code I've been using is this:
<?php network_query_posts('category_name=actueel&posts_per_page=3&orderby=date&order=DESC'); if ( network_have_posts() ) { echo '<ul>'; while ( network_have_posts() ) { network_the_post(); echo '<li class="news">'; $blog_name = network_get_blogname(); $the_date = network_get_the_date(); $the_permalink = network_get_permalink(); $the_title = network_get_the_title(); $the_excerpt = excerpt(15); echo '<span class="blogdate">', mysql2date('j.m.Y', $the_date), '</span>'; echo '<span class="blogname">', $blog_name, '</span>'; echo '<br />'; echo '<a class="title" href="', $the_permalink, '">', $the_title, '</a>'; echo $the_excerpt; echo ' ... <a class="readmore" href="', $the_permalink, '">lees verder ></a>'; echo '</li>'; } echo '</ul>'; } ?>

So I've found a declaration of 'network_get_the_excerpt' in the plugin php files, but if I use that instead of 'excerpt(15)', the excerpt shown IS correct BUT it is way too long and has an '[...]' included in the end.

Any suggestions on how to fix this would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant