Title: Sectors &#8211; Conditional Templates &amp; Hooks
Author: Joachim Jensen
Published: <strong>फेब्रुवारी 5, 2018</strong>
Last modified: जुलै 28, 2024

---

प्लगइन शोधा

![](https://ps.w.org/sectors/assets/banner-772x250.png?rev=2064763)

हे प्लगइन **WordPress च्या शेवटच्या 3 महत्त्वाच्या प्रमुख पुनर्वितरणांच्या साथी 
चाचणी झालेले नाही**. हे येथे वापरल्यास सामर्थ्य देणार नाही किंवा त्या आधारित असु
शकते आणि WordPress च्या अधिक अद्ययावत आवृत्तींसह वापरताना संगतता समस्यांची शक्यता
आहे.

![](https://ps.w.org/sectors/assets/icon-256x256.png?rev=2064763)

# Sectors – Conditional Templates & Hooks

 [Joachim Jensen](https://profiles.wordpress.org/intoxstudio/) कडून

[डाउनलोड करा](https://downloads.wordpress.org/plugin/sectors.zip)

 * [तपशील](https://mr.wordpress.org/plugins/sectors/#description)
 * [पुनरावलोकने](https://mr.wordpress.org/plugins/sectors/#reviews)
 *  [इंस्टॉलेशन](https://mr.wordpress.org/plugins/sectors/#installation)
 * [डेव्हलोपमेंट](https://mr.wordpress.org/plugins/sectors/#developers)

 [समर्थन](https://wordpress.org/support/plugin/sectors/)

## वर्णन

Sectors is a first of its kind plugin for WordPress. Create theme templates for 
any context on your site. Make sure select Actions or Filters are only added when
certain conditions are met.

#### Contexts

When you add a new sector to your site, you select the content it covers. This could
be:

 * All posts in a select category
 * Pages by an author
 * Custom Post Types with a Custom Taxonomy
 * …
 * Any combination of above

Sectors also comes with built in support for BuddyPress, WPML, Polylang, and more.

#### Templates

Sectors will look in your theme folder for the following templates:

 * `/sectors/<sector-name>.php`
 * `/sector-<sector-name>.php`

If found, it will be automatically loaded for the context.

#### API

**Template Tags**

Check if a query is part of a given or any sector:

    ```
    is_sector(string $sector):boolean
    ```

Get all sectors for current context:

    ```
    get_current_sectors():array
    ```

**Hooks**

Sectors extends all WordPress Actions and Filters by adding a scope. This means 
you can add a callback to an action and make sure it’s only executed in a given 
context:

    ```
    add_sector_action(string $sector, string $tag, callable $function, int $priority = 10, int $accepted_args = 1 )

    add_sector_filter(string $sector, string $tag, callable $function, int $priority = 10, int $accepted_args = 1 )
    ```

## स्क्रीनशॉट

[⌊Actions & Filters without Sectors⌉⌊Actions & Filters without Sectors⌉[

Actions & Filters without Sectors

[⌊Actions & Filters using Sectors⌉⌊Actions & Filters using Sectors⌉[

Actions & Filters using Sectors

## स्थापना

 1. Upload the full plugin directory to your `/wp-content/plugins/` directory or install
    the plugin through `Plugins` in the Admin Dashboard
 2. Activate the plugin through `Plugins` in the Admin Dashboard
 3. Create your first Sector under the menu _Sectors > Add New_

## समीक्षा

ह्या प्लगइनसाठी कोणतेही समीक्षण नाही.

## योगदानकर्ते आणि विकसक

“Sectors – Conditional Templates & Hooks” हे मुक्त स्रोत सॉफ्टवेअर आहे. पुढील लोक
या प्लगइनच्या निर्मितीत योगदान केले आहे.

योगदानकर्ते

 *   [ Joachim Jensen ](https://profiles.wordpress.org/intoxstudio/)
 *   [ DEV Institute ](https://profiles.wordpress.org/devinstitute/)

[भाषांतर करा “Sectors – Conditional Templates & Hooks” तुमच्या भाषेत.](https://translate.wordpress.org/projects/wp-plugins/sectors)

### विकासातील आग्रह?

[कोड ब्राउझ करा](https://plugins.trac.wordpress.org/browser/sectors/), [SVN संग्रहालय](https://plugins.svn.wordpress.org/sectors/)
तपासा, किंवा [विकास लॉग](https://plugins.trac.wordpress.org/log/sectors/) च्या [RSS](https://plugins.trac.wordpress.org/log/sectors/?limit=100&mode=stop_on_copy&format=rss)
द्वारे सदस्यता घ्या.

## बदलांची यादी

#### 1.2

 * Added: wordpress 5.5 support
 * Added: minimum wordpress version 4.8
 * Added: minimum php version 5.6
 * Updated: wp-content-aware-engine
 * Updated: wp-db-updater

#### 1.1

 * Added: api to get current sectors
 * Added: ‘sector’ to body class
 * Added: ui improvements
 * Updated: wp-content-aware-engine

#### 1.0

 * Welcome

## मेटा

 *  आवृत्ती **1.2**
 *  शेवटचा अद्यतन **2 वर्षे पूर्वी**
 *  सक्रिय स्थापना **10+**
 *  वर्डप्रेस आवृत्ती ** 4.8 किंवा मोठा **
 *  परीक्षित केले आहे **6.6.7**
 *  PHP आवृत्ती ** 5.6 किंवा मोठा **
 *  भाषा
 * [English (US)](https://wordpress.org/plugins/sectors/)
 * टॅग्ज:
 * [actions](https://mr.wordpress.org/plugins/tags/actions/)[filters](https://mr.wordpress.org/plugins/tags/filters/)
   [hooks](https://mr.wordpress.org/plugins/tags/hooks/)
 *  [प्रगत दृश्य](https://mr.wordpress.org/plugins/sectors/advanced/)

## मूल्यांकन

अजून कोणतीही पुनरावलोकने सबमिट केलेली नाहीत.

[आपला अभिप्राय](https://wordpress.org/support/plugin/sectors/reviews/#new-post)

[सर्व पुनरावलोकने पहा](https://wordpress.org/support/plugin/sectors/reviews/)

## योगदानकर्ते

 *   [ Joachim Jensen ](https://profiles.wordpress.org/intoxstudio/)
 *   [ DEV Institute ](https://profiles.wordpress.org/devinstitute/)

## समर्थन

काहीतरी सांगायचं आहे का? मदतीची आवश्यकता आहे का?

 [समर्थन फोरम पहा](https://wordpress.org/support/plugin/sectors/)