gatsbyjs / wp-gatsby

WordPress plugin for gatsby-source-wordpress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The webhook is triggered also for posts that are excluded in Gatsby config

KarlBaumann opened this issue · comments

gatsby-source-wordpress plugin has a Type parameter which allows to exclude certain post types. This exclude list should be taken into account when triggering web hook.

In the worst case there should be a filter which allows to exclude post types ourselves.

Hi @KarlBaumann, this isn't possible since WPGatsby can't fetch gatsby-config.js options. Instead, use this filter to exclude post types from the action monitor:

$tracked_post_types = apply_filters(