entity-command icon indicating copy to clipboard operation
entity-command copied to clipboard

Add a means of fetching the permalink to a post

Open johnbillion opened this issue 7 years ago • 4 comments

There is no built-in means of fetching the permalink to a given post.

The only place where a permalink is exposed is in wp post list if you explicitly include the --fields=url option.

I'd like to see either:

  • A url field added to the output of wp post get.
  • A wp post url <id> command.

johnbillion avatar Dec 21 '17 02:12 johnbillion

The same thing applies to terms, users, and comments.

johnbillion avatar Dec 21 '17 02:12 johnbillion

Previously https://github.com/wp-cli/wp-cli/issues/2070

danielbachhuber avatar Dec 21 '17 02:12 danielbachhuber

I'm re-opening this, as it would still be nice to have wp post get $ID --fields=url rather than being forced to wp post list --post__in=$ID --fields=url.

It makes sense (to me) for the list/get methods to return the same data/have the same fields.

dd32 avatar Sep 27 '21 01:09 dd32

I will work on this.

tubiz avatar Sep 11 '22 21:09 tubiz