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)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of 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://as.wordpress.org/plugins/sectors/#description)
 * [পৰ্য্যালোচনা](https://as.wordpress.org/plugins/sectors/#reviews)
 *  [ইনষ্টলেশ্যন](https://as.wordpress.org/plugins/sectors/#installation)
 * [বিকাশ](https://as.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 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/)
চাওক নাইবা [RSS](https://plugins.trac.wordpress.org/log/sectors/?limit=100&mode=stop_on_copy&format=rss)-
দ্বাৰা [বিকাশৰ পঞ্জী](https://plugins.trac.wordpress.org/log/sectors/) ছাবস্ক্ৰাইব
কৰক।

## সলনি-পঞ্জী

#### 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+**
 *  WordPress-ৰ সংস্কৰণ ** 4.8 বা তাতকৈ ওপৰৰ **
 *  ইমানলৈকে পৰীক্ষা কৰা হৈছে **6.6.5**
 *  PHP-ৰ সংস্কৰণ ** 5.6 বা তাতকৈ ওপৰৰ **
 *  ভাষা
 * [English (US)](https://wordpress.org/plugins/sectors/)
 * [actions](https://as.wordpress.org/plugins/tags/actions/)[filters](https://as.wordpress.org/plugins/tags/filters/)
   [hooks](https://as.wordpress.org/plugins/tags/hooks/)
 *  টেগবোৰ
 *  [উচ্চখাপৰ ভিউ](https://as.wordpress.org/plugins/sectors/advanced/)

## ৰে’টিংবোৰ

এতিয়ালৈ কোনো পৰ্য্যালোচনা দাখিল কৰা হোৱা নাই।

[Your review](https://wordpress.org/support/plugin/sectors/reviews/#new-post)

[See all reviews](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/)