# استبعاد وتصنيع كتل المشاركات المنشورة

**URL:** https://meta.discourse.org/t/filter-out-and-exclude-blocks-of-published-post/306897
**Category:** WordPress
**Created:** [6 مايو 2024، 7:50ص UTC](https://meta.discourse.org/t/filter-out-and-exclude-blocks-of-published-post/306897 "2024-05-06T07:50:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![npm0912](https://avatars.discourse-cdn.com/v4/letter/n/85e7bf/32.png) [@npm0912](https://meta.discourse.org/u/npm0912)
#### Post date: [6 مايو 2024، 7:50ص UTC](https://meta.discourse.org/t/filter-out-and-exclude-blocks-of-published-post/306897/1 "2024-05-06T07:50:55Z")

</div>

مرحباً،  
كنت أتساءل عما إذا كانت هناك طريقة سريعة في إضافة [WP Discourse](https://github.com/discourse/wp-discourse) لتصفية واستبعاد كتل أو أقسام كاملة (ربما بناءً على المعرف) من المنشور الذي يتم إرساله إلى المنتدى.  
إذا لم يكن ذلك ممكناً، فسيكون من الجيد على الأقل استبعاد رمز قصير معين، مثل [ninja\_form] الذي يتم استخدامه في منشور المدونة.

شكراً جزيلاً!

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [6 مايو 2024، 9:25ص UTC](https://meta.discourse.org/t/filter-out-and-exclude-blocks-of-published-post/306897/2 "2024-05-06T09:25:32Z")

</div>

مرحباً بيتر، نعم، هذا ممكن باستخدام فلتر `wp_discourse_excerpt`:

> [@WP Discourse Filters and Actions](https://meta.discourse.org/t/wp-discourse-filters-and-actions/307211#wp_discourse_excerpt-13):
>
> These are all actions and filters provided by the WP Discourse plugin. Examples are illustrative only. You will need to test and validate the example on your own instance before using it in production. Filters For a general explanation on how you can use filters in Wordpress see Publishing WP Discourse publishing filters. discourse\_post\_types\_to\_publish Filter the post types which appear in the “Post Types to Publish” setting post type list. Note that this will not enable or disable discour…
