ھي پلگ ان WordPress جي جديد 3 وڏين رليزز سان آزمايو نه ويو آھي. اهو ٿي سگهي ٿو وڌيڪ برقرار يا سپورٽ نه ٿي سگهي ۽ ٿي سگهي ٿو مطابقت جا مسئلا جڏهن ورڈپریس جي وڌيڪ تازي ورزن سان استعمال ڪيو وڃي.

Rich Taxonomy

وضاحت

This plugin create a custom post type “Taoxnomy Page” which related to a term.

How It Works

Taxonomy Page will override the 1st page of term archive. You can choose which taxonomy to have a Taxonomy Page.

For example:

  1. You have decided “category” to have Taxonomy Page.
  2. Create a Taxonomy Page “Book” for category “Book”.
  3. Edit the Taxonomy Page in block editor and publish it.
  4. Now the 1st page of “Book” category /category/book will dipslay the contents of the Taxonomy Page “Book”.

Template Structure

You can choose a template for the taxonomy page in editor,
but you can put singular-taxonomy-page.php template in your theme and there’s no need to choose.
Below is the default template priority.

  1. singular-taxonomy-page.php
  2. page.php
  3. singular.php
  4. single.php
  5. index.php

Filter hook rich_taxonomy_include_template is also available.

Customization

Archive Block

Archive blocks has tempalte structure like below.

template-parts
- rich-taxonomy
  - archive-block-loop.php    // Loop of post list.
  - archive-block-more.php    // Link button.
  - archive-block-toggle.php  // Toggle button.
  - archive-block-wrapper.php // Wrapper of archive.

If the theme has files in the same path, that priors.
Copy the file and customize one as you like.

Styles

To override styles, 4 hooks are available.

  1. rich_taxonomy_block_asset_style
  2. rich_taxonomy_block_asset_editor_style
  3. rich_taxonomy_block_asset_script
  4. rich_taxonomy_block_asset_editor_script

To change looks & feels, rich_taxonomy_block_asset_style is the best starting point.

// Register style.
add_action( 'init', function() {
    wp_registeR_style( 'my-archive-block', $url, $deps, $version );
} );

// Override handle.
add_filter( 'rich_taxonomy_block_asset_style', function( $handle, $block_name ) {
    if ( 'rich-taxonomy/arcvhie-block' === $block_name ) {
        $handle = 'my-archive-block';
    }
    return $handle;
}, 10, 2 );

This style is loaded in both public and editor.

Default Contents

To define the default contents of the taxonomy page, use rich_taxonomy_default_post_object filter hook.

/**
 * Filter default post object.
 *
 * @param array   $args    Post object passed to wp_insert_post().
 * @param WP_Term $term    Term object assigned to this post.
 * @param string  $context Currently only 'api' is supported.
 */ 
add_filter( 'rich_taxonomy_default_post_object', function( $args, $term, $contest ) {
    // If specific taxonomy, enter default content.
    if ( 'category' === $term->taxonomy ) {
        // Post body.
        $args['post_content'] = 'Here comes default content.';
        // Publish immediately.
        $args['post_status']  = 'publish';
    }
    return $args;
}, 10, 3 );

انسٽاليشن

From Plugin Directory

  1. Click install and activate it.
  2. Select the taxsonomies at the Reading Settings page (Setting > Reading).

From Github

See releases.

FAQ

Where can I get supported?

Please create a new ticket on the support forum.

How can I contribute?

Create a new issue or send pull requests.

جائزا

ھن پلگ ان لاءِ ڪي به رايا ناھن.

تعاون ڪندڙ & ڊولپرز

“Rich Taxonomy” اوپن سورس سافٽ ويئر آهي. ھيٺين ماڻھن ھن پلگ ان ۾ حصو ورتو آھي.

تعاون ڪندڙ

واحد: “Rich Taxonomy” 1 لوڪل ۾ ترجمو ڪيو ويو آهي. ترجمي ڪندڙن جي مهرباني سندن تعاون لاءِ.

ترجمو ڪريو “Rich Taxonomy” توهان جي ٻولي ۾.

ڊولپمينٽ ۾ دلچسپي؟

ڪوڊ براؤز ڪريو، چيڪ ڪريو SVN مخزن، يا رڪنيت حاصل ڪريو ڊولپمينٽ لاگ پاران RSS.

لاگ تبدیل ڪريو

1.1.2

  • Fix bug on template selector.

1.1.1

  • Fix a bug that breaks the block widgets screen.
  • Update README for clearance of installation. props @megane9988

1.1.0

  • Fix the bug for block disappearing.

1.0.9

  • Fix a bug in the template selector in the taxonomy page editor.

1.0.0

  • First release.