Title: Select Primary Category
Author: denizozsen
Published: <strong>13. јун 2018.</strong>
Last modified: 13. јун 2018.

---

Претражи додатке

Овај додатак **није испробан са последња 3 главна издања Вордпреса**.Можда се више
не одржава или подржава и можда има грешке са усклађеношћу са новијим издањима Вордреса.

![](https://s.w.org/plugins/geopattern-icon/deniz-primary-category.svg)

# Select Primary Category

 [denizozsen](https://profiles.wordpress.org/denizozsen/)

[Преузимање](https://downloads.wordpress.org/plugin/deniz-primary-category.zip)

 * [Детаљи](https://sr.wordpress.org/plugins/deniz-primary-category/#description)
 * [Прегледи](https://sr.wordpress.org/plugins/deniz-primary-category/#reviews)
 *  [Постављање](https://sr.wordpress.org/plugins/deniz-primary-category/#installation)
 * [Изградња](https://sr.wordpress.org/plugins/deniz-primary-category/#developers)

 [Подршка](https://wordpress.org/support/plugin/deniz-primary-category/)

## Опис

Features:
 * Ability to designate a primary category for posts and custom post types.*
Supports custom post types and custom taxonomies with hierarchical structure. * 
Category in permalink is the primary category, if one is set. * Shortcode for displaying
posts with a specific primary category. * CLI command for listing posts with a specific
primary category.

## Постављање

 1. Add the plugin folder to WordPress’ plugin directory.
 2. Activate the plugin from Admin > Plugins.
 3. Start using it.

## ЧПП

  Installation Instructions

 1. Add the plugin folder to WordPress’ plugin directory.
 2. Activate the plugin from Admin > Plugins.
 3. Start using it.

  When using the shortcode, do I need to use the primary category’s ID, slug or 
name?

You can use either of them. E.g. assuming a category with ID 3, slug ‘ground-coffee’
and name ‘Ground Coffee’.
 the following shortcode definitions will all work:

    ```
    [posts_by_primary_category category="3"]
    [posts_by_primary_category category="ground-coffee"]
    [posts_by_primary_category category="Ground Coffee"]
    ```

  Developers’ Notes

If you want to fetch posts belonging to a particular category (or, more generally,
belonging to a particular term)
 you can use this:

    ```
    if ( class_exists( 'SPC_Queries' ) ) {
        /*
         * Let's fetch 10 published posts with primary category set to category ID 2.
         */
        $spc_queries =  SPC_Infrastructure_Container::get_instance()->get( 'SPC_Queries' );
        $posts = $spc_queries->get_primary_term_posts( 2, array(
            'post_status'    => 'publish',
            'posts_per_page' => 10,
            'post_type'      => 'post',
        ) );
    }
    ```

You can just as well pass a category slug or name, instead of its ID, if you prefer.

## Прегледи

Нема рецензија за овај додатак.

## Сарадници и градитељи

„Select Primary Category“ је софтвер отвореног кода. Следећи људи су допринели овом
додатку.

Сарадници

 *   [ denizozsen ](https://profiles.wordpress.org/denizozsen/)

[Преведите „Select Primary Category“ на свој језик.](https://translate.wordpress.org/projects/wp-plugins/deniz-primary-category)

### Заинтересовани сте за градњу?

[Прегледајте код](https://plugins.trac.wordpress.org/browser/deniz-primary-category/),
проверите [SVN складиште](https://plugins.svn.wordpress.org/deniz-primary-category/)
или се пријавите на [белешку градње](https://plugins.trac.wordpress.org/log/deniz-primary-category/)
преко [RSS-а](https://plugins.trac.wordpress.org/log/deniz-primary-category/?limit=100&mode=stop_on_copy&format=rss).

## Белешка о изменама

#### 1.0

 * Initial public release.

## Мета

 *  Version **1.0**
 *  Last updated **8 година раније**
 *  Active installations **Мање од 10**
 *  WordPress version ** 4.5 или новије **
 *  Language
 * [English (US)](https://wordpress.org/plugins/deniz-primary-category/)
 * Tags
 * [category](https://sr.wordpress.org/plugins/tags/category/)[primary](https://sr.wordpress.org/plugins/tags/primary/)
   [taxonomy](https://sr.wordpress.org/plugins/tags/taxonomy/)
 *  [Напредни преглед](https://sr.wordpress.org/plugins/deniz-primary-category/advanced/)

## Оцене

No reviews have been submitted yet.

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

[See all reviews](https://wordpress.org/support/plugin/deniz-primary-category/reviews/)

## Сарадници

 *   [ denizozsen ](https://profiles.wordpress.org/denizozsen/)

## Подршка

Имате нешто да кажете? Потребна вам је помоћ?

 [Види форум подршке](https://wordpress.org/support/plugin/deniz-primary-category/)