=== Latest Posts by Author with content ===
Contributors: opensourcetech
Tags: posts, authors, recent posts, shortcode, author posts
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

List an author's latest posts with a short preview of each post, using a shortcode.

== Description ==

Latest Posts by Author with content shows a list of an author's newest posts. Each item has the post title, a short preview of its content and a "Read more" link.

Use it in a post, page, widget or theme template:

`[latestbyauthor author="username" show="3"]`

* `author` – the author's username. Use commas for several authors: `author="anna,ben"`. Inside a post, it defaults to that post's author.
* `show` – number of posts, 1 to 50. Default: 5.
* `length` – characters of content to show. Default: 200.
* `excerpt` – `true` to also show the post's manual excerpt. Default: `false`.

In a theme template: `<?php echo do_shortcode( '[latestbyauthor author="username" show="3"]' ); ?>`

On a single post, that post is left out of the list. Only published, public posts are listed.

== Installation ==

1. In your WordPress admin go to Plugins > Add New, search for "Latest Posts by Author with content", then install and activate it.
2. Add `[latestbyauthor]` to a post, or `[latestbyauthor author="username"]` anywhere else.

== Frequently Asked Questions ==

= Nothing is shown =

Outside a single post you must set `author`. Check the username is correct and that the author has published posts.

= Do my existing shortcodes still work after updating to 2.0.0? =

Yes. The shortcode and its `author`, `show` and `excerpt` attributes are unchanged.

== Changelog ==

= 2.0.0 =
* Security: all output is escaped, and password-protected posts are no longer listed.
* Fixed a PHP warning or fatal error when an author username did not exist.
* Fixed the content preview cutting HTML tags and shortcodes in half.
* Fixed an empty list being printed when the author had no posts.
* New `length` attribute for the preview length.
* Author can also be given as a user ID or author slug.
* "Read more" links now include the post title for screen readers.
* Now requires WordPress 6.0 and PHP 7.4 or later. Tested up to WordPress 7.1.

= 1.0 =
* Initial release.

== Upgrade Notice ==

= 2.0.0 =
Security and PHP 8 compatibility update. Existing shortcodes keep working.
