Recent

Related_Command class Pro only

Related posts command for CRP.

Namespace: WebberZone\Contextual_Related_Posts\Pro\CLI
Since: 4.2.0
Source: includes/cli/class-related-command.php line 24 Extends: Base_Command

Methods

__invoke()

Show related posts for a specific post.

OPTIONS

: Post ID to get related posts for.

[—limit=] : Number of related posts to show. Default: 10.

[—url=] : Specific site URL to show related posts for (multisite only).

[—blog-id=] : Specific blog ID to show related posts for (multisite only).

[—format=] : Output format. Options: table, json, csv, yaml. Default: table.

EXAMPLES

wp crp related 123
wp crp related 123 --limit=5
wp crp related 123 --format=json
wp crp related 123 --url=http://example.com/site2

Line: 57

public function __invoke( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void