Skip to content

Showing excerpt of last 3 global posts stopped working #1

@Eskeemo

Description

@Eskeemo

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions