Skip to content

Export only posts from selected category or sub-categories #206

Description

@zcourts

I'm trying have only selected categories exported. I thought using one of the filters would allow me to do that but can't seem to make that work.
So I have two questions:

  1. Can I use a filter to export only posts in a category or sub-categories thereof? If so, how?
  2. Can I disable deletes from github triggering deletes in WP? If a doc is to be deleted I'd either like to do it manually or make it so that only those matching a filter can be deleted

For 1 I've tried:

add_filter('wpghs_pre_fetch_all_supported', function ($supported_post_statuses) {
    return array(
        'category_name' => 'blog'
    );
});

add_filter('wpghs_pre_import_args', function ($supported_post_statuses) {
    return array(
        'category_name' => 'blog'
    );
});

add_filter('wpghs_is_post_supported', function ($supported_post_statuses) {
    return array(
        'category_name' => 'blog'
    );
});

None of which seems to work.
I have pages and posts that I don't want editable via GH and others that I'll allow third parties to edit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions