WP Manifestindependent plugin directory
manifest / seo / fx-primary-term

f(x) Primary Term WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Set primary term for a taxonomy in a post.

★ 0stars
17release downloads
1.0.2latest · 8 years ago

Install

Download fx-primary-term.1.0.2.zip From the 1.0.2 release on GitHub, Jan 18, 2018

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/turtlepod/fx-primary-term/releases/download/1.0.2/fx-primary-term.1.0.2.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Simple plugin to enable primary term. As default only supports Post Category.

Description

Simple plugin to enable primary term. As default only supports Post Category.

Developer can easily extend the plugin to support custom post types and custom taxonomy.

This plugin currently only supports hierarchical taxonomy.

This plugin is very similar with Yoast SEO plugin "Primary Term" functionality. You do not need this plugin if you already have Yoast SEO active.

Installation

  1. Navigate to "Plugins > Add New" Page from your Admin.
  2. To install directly from WordPress.org repository, search the plugin name in the search box and click "Install Now" button to install the plugin.
  3. To install from plugin .zip file, click "Upload Plugin" button in "Plugins > Add New" Screen. Browse the plugin .zip file, and click "Install Now" button.
  4. Activate the plugin.

Frequently Asked Questions

How to get primary term?

You can use fx_primary_term_get_primary_term() function. Here's an example usage.

$primary_category_id = fx_primary_term_get_primary_term( 'category', get_the_ID() );
if ( $primary_category_id ) {
    // Do something.
}

How to add support to custom post type/taxonomy

Here's and example function for adding support for "genre" taxonomy in "book" cpt:

add_filter( 'fx_primary_term_taxonomies', function( $tax ) {
    $tax['book'] = array( 'genre' );
    return $tax;
} );

Screenshots

  1. No screenshots.

Changelog

1.0.2 - 18 Jan 2018

  • Most Used Tabs Support.

1.0.1 - 15 Jan 2018

  • Bug Fix: Now works with new post screen.
  • Minor improvements.
  • Deprecate & Change fx_primary_get_term_meta_key() to fx_primary_term_get_post_meta_key().
  • Deprecate "fx_primary_term_meta_key" filter, now use "fx_primary_term_post_meta_key". No fallback.

1.0.0 - 12 Jan 2018

  • Initial release.

Upgrade Notice

1.0.0

initial relase.

Other Notes

Notes for developer:

Github

Development of this plugin is hosted at GitHub. Pull request and bug reports are welcome.

Releases

3 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
1.0.2 latest
Jan 18, 2018 8 years ago
fx-primary-term.1.0.2.zip
11
Jan 15, 2018 8 years ago
fx-primary-term.1.0.1.zip
4
Jan 12, 2018 8 years ago
fx-primary-term.1.0.0.zip
2
A grade

Security

f(x) Primary Term 1.0.2 · audited by WP Registry

No security issues found.

Audited release
1.0.2
Findings
none
Worst severity
—
Content hash
598241dd484f9036dc41dea8…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.