Skip to:
Content
Pages
Categories
Search
Top
Bottom

WP-CLI commands for bbPress?

  • @ludovicsclain

    Participant

    Hi there,
    if I run a command like wp post-type list I have ‘forum’, ‘topic’ and ‘reply’ which are listed but when I run wp post list --post_type=topic the table remains empty , is this normal?
    Thanks for your help!
    Ludovic

Viewing 5 replies - 1 through 5 (of 5 total)
  • @robin-w

    Moderator

    from your example, you haven’t said what you want the cli to output

    eg

    $ wp post list –post_type=topic –fields=post_title,post_status

    or

    $ wp post list –post_type=topic,post –format=ids

    see examples in

    wp post list

    @ludovicsclain

    Participant

    Hi Robin,
    thank you for your reply.

    For your reference, wp-cli commands often (if not all) have default outputs and they do not need to be explicitly declared unless particular outputs are expected.

    Here is a list of all post types available on my WordPress installation:

    https://markuphero.com/share/5dn5FOkMzGNpG9R6Unbx

    As you can see, I have a custom post type named ‘sfwd-lessons’ so if I run the command wp post list --post_type=sfwd-lessons I have all these custom posts which are listed with the default outputs:

    https://markuphero.com/share/8Mbqbgujeaou2QH60l1k

    But when i’m trying wp post list --post_type=topic the output is empty:

    https://markuphero.com/share/3APucSjLM0IHRgLHIuVb

    https://markuphero.com/share/V3pihOOXPNQWUx3Knzqd

    Have you really tried it on your end?

    Warm regards,
    Ludovic

    @robin-w

    Moderator

    Sorry, I am not a bbpress author, just someone who tries to help out here – I don’t always succeed.

    I’ve never tried or used CLI

    Hope you find a solution

    @robin-w

    Moderator

    found this on googling ‘wp cli bbpress’

    https://github.com/bbpress/wp-cli-bbpress

    @ludovicsclain

    Participant

    It’s odd that bbPress’s WP-CLI commands are being developed as a separate package, keenly that the authors are interested in it, thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar