Metadata v taxonomiích

**Category and Taxonomy Meta Fields**
„https://wordpress.org/plugins/wp-custom-taxonomy-meta/“:https://wordpress.org/plugins/wp-custom-taxonomy-meta/

Plugin to add custom meta fields within built in and custom taxonomies. Simply add the desired fields by going through WP-admin -> Settings ->Taxonomy Meta .
You can add following fields with category/taxonomy:
– Image
– Input Text
– Textarea
– Checkbox

**Taxonomy Metadata**
„https://wordpress.org/plugins/taxonomy-metadata/“:https://wordpress.org/plugins/taxonomy-metadata/

This plugin implements the metadata infrastructure for taxonomy terms, so you can add custom metadata (by key) to tags, categories, and other taxonomies. The majority of the code is from sirzooro’s submission to the WordPress Core Trac. The rest of the plugin is simply some hacky glue to make this work without modifying the Core. It does not implement any UI for taxonomy term metadata.

**Meta for taxonomies**
„https://wordpress.org/plugins/meta-for-taxonomies/“:https://wordpress.org/plugins/meta-for-taxonomies/

Add meta for any taxonomies. Meta is attached to taxonomy context and not terms, this way allow to have metas different for the same term on 2 different taxonomies. This plugin don’t any interface on WordPress ! Only somes methods for developpers.

**Taxonomy Images**
„https://wordpress.org/plugins/taxonomy-images/“:https://wordpress.org/plugins/taxonomy-images/

Associate images from your media library to categories, tags and custom taxonomies.

**Carbon Fields**
„https://wordpress.org/plugins/carbon-fields/“:https://wordpress.org/plugins/carbon-fields/

Developer-oriented library for WordPress custom fields for all types of WordPress content.
Carbon fields is a plugin that can be used as a library for easy creation of custom fields in the WordPress administration panel.
Can be created for post types, taxonomy terms, users, comments, options, navigation menus and even widgets.

Uživatelské taxonomie, přidávání uživatelských polí k taxonomiím

„Custom user taxonomies »“:http://justintadlock.com/archives/2011/10/20/custom-user-taxonomies-in-wordpress

*

To add a custom field to your custom taxonomy, add the following code to your theme’s functions.php:
/—code php
// A callback function to add a custom field to our „presenters“ taxonomy
function presenters_taxonomy_custom_fields($tag) {
// Check for existing taxonomy meta for the term you’re editing
$t_id = $tag->term_id; // Get the ID of the term you’re editing
$term_meta = get_option( „taxonomy_term_$t_id“ ); // Do the check
?>

term_id“ );
// Return the value for the „presenter_id“ custom field
$presenter_data = get_userdata( $presenter_custom_fields[presenter_id] ); // Get their data
\—

To see what data is stored inside the custom fields you created, add the print_r function to your template, then preview it:
/—code php
‚; print_r( $presenter_custom_fields ); echo ‚

‚;
?>
\—

To keep it dynamic, we are passing in the „presenter_id“ field of our $presenter_custom_fields variable. Now, to see what data you have to work with, use print_r again:
/—code php
‚; print_r( $presenter_data ); echo ‚

‚;
?>
\—
„Zdroj: How To Add Custom Fields To Custom Taxonomies »“:http://sabramedia.com/blog/how-to-add-custom-fields-to-custom-taxonomies

***

To add a form field to the Edit Category screen we’ll use the edit_category_form_fields action hook available in WordPress:
/—code php
term_id, $cat_featured ) ) {
$featured_id = $cat_featured[$tag->term_id] ;
}
?>

The post ID that will be the featured post when viewing this category.


\—
The above code will add a single text field (Featured Post ID) to the Edit Category screen.

Now we need to save the input to our option array. To capture the ID when a category is updated we’ll use the edited_category action hook like so:

/—code php

\—
As you can see we are saving the Category ID and Featured Post ID as a single associative array option value in WordPress named category_featured. As you add Featured Post ID values to each of your categories they will be added to this array and saved in WordPress.

„Save Taxonomy Meta Data as an Options Array in WordPress »“:http://strangework.com/2010/07/01/how-to-save-taxonomy-meta-data-as-an-options-array-in-wordpress/

***

„How to Add Custom Meta Fields to Custom Taxonomies in WordPress »“:http://www.wpbeginner.com/wp-tutorials/how-to-add-additional-custom-meta-fields-to-custom-taxonomies/

„Adding Custom Meta Fields to Taxonomies »“:https://pippinsplugins.com/adding-custom-meta-fields-to-taxonomies/

„How To Add Custom Fields To Custom Taxonomies»“:http://sabramedia.com/blog/how-to-add-custom-fields-to-custom-taxonomies

„WordPress: Adding custom fields to taxonomies »“:http://www.journal.deviantdev.com/wordpress-adding-custom-fields-to-taxonomies/

„WordPress Taxonomies Extra Fields the easy way »“:https://en.bainternet.info/wordpress-taxonomies-extra-fields-the-easy-way/

„Hooking WordPress Taxonomy Changes With The Plugins API »“:https://www.dougv.com/2014/06/hooking-wordpress-taxonomy-changes-with-the-plugins-api/

„Extending WordPress Taxonomies »“:http://www.sitepoint.com/extending-wordpress-taxonomies/

Nastavení defaultní hodnoty pro tagy a uživatelské taxonomie

Příspěvek se automaticky zařadí do výchozí rubriky, i když ji nepřiřadíme. To ale neplatí pro štítky (tagy) a uživatelské taxonomie.
Jak to nastavit v tomto případě:

/—code php
function mfields_set_default_object_terms( $post_id, $post ) {
if ( ‚publish‘ === $post->post_status ) {
$defaults = array(
‚post_tag‘ => array( ‚štítek 1‘, ‚štítek 2‘ ),
‚moje taxonomue‘ => array( ‚Defaultní hodnota‘ ),
);
$taxonomies = get_object_taxonomies( $post->post_type );
foreach ( (array) $taxonomies as $taxonomy ) {
$terms = wp_get_post_terms( $post_id, $taxonomy );
if ( empty( $terms ) && array_key_exists( $taxonomy, $defaults ) ) {
wp_set_object_terms( $post_id, $defaults[$taxonomy], $taxonomy );
}
}
}
}
add_action( ‚save_post‘, ‚mfields_set_default_object_terms‘, 100, 2 );
\—

„http://wordpress.mfields.org/2010/set-default-terms-for-your-custom-taxonomies-in-wordpress-3-0/“:http://wordpress.mfields.org/2010/set-default-terms-for-your-custom-taxonomies-in-wordpress-3-0/

Rich text editor (Tiny MCE) pro popisky tagů. rubrik a dalších taxonomií

**The Rich Text Tags – A TinyMCE Editor for Tags, Categories, and Taxonomies**
„http://wordpress.org/extend/plugins/rich-text-tags/“:http://wordpress.org/extend/plugins/rich-text-tags/

The Rich Text Tags Plugin allows you to edit tag descriptions, category descriptions, and taxonomy descriptions using WordPress‘ built in rich-text editor. Switch between WYSIWYG and HTML editing modes with the click of a link. Use the WordPress uploader to insert images from your computer or site’s Media Library.

Use the WordPress functions tag_description() and category_description() in your theme to show the descriptions. To learn how to show taxonomy descriptions, read more on the plugin page.
Features

– Edit term descriptions with WordPress’s built-in WYSIWYG editor
– Works with custom taxonomies (and custom post types, introduced in WP 3.0)
– Now supports user biography fields!

Různé typy příspěvků, taxonomie, metaboxy

„Custom post types in WordPress »“:http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress

„A refresher on custom taxonomies »“:http://justintadlock.com/archives/2010/06/10/a-refresher-on-custom-taxonomies

„Introducing WordPress 3 Custom Taxonomies »“:http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/

„Innovative Uses of WordPress Post Types and Taxonomies „:http://wp.tutsplus.com/tutorials/theme-development/innovative-uses-of-wordpress-post-types-and-taxonomies/

„Custom Fields 101: Tips, Tricks, and Hacks »“:http://www.wpbeginner.com/wp-tutorials/wordpress-custom-fields-101-tips-tricks-and-hacks/

„Publish Action Hook for Custom Post Types »“:http://pippinspages.com/tutorials/publish-action-hook-for-custom-post-types/

„WordPress Custom Taxonomy Input Panels »“:http://www.shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels

„Revisiting Custom Post Types, Custom Taxonomies, and Permalinks »“:http://mondaybynoon.com/2011/05/20/revisiting-custom-post-types-taxonomies-permalinks-slugs/

„WordPress Custom Post Type Code Generator »“:http://themergency.com/generators/wordpress-custom-post-types/

**“Jak vytvořit vlastní metabox »“:http://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.html**

**“How To Create Custom Post Meta Boxes »“:https://www.smashingmagazine.com/2011/10/create-custom-post-meta-boxes-wordpress/**

Using custom meta box is a great way to make custom fields more friendly to users. It helps us much to add extra information to a post.

[* http://3.bp.blogspot.com/_Mt4qyhflsHY/S9XKl_VkMhI/AAAAAAAAAio/OK9s8GWmIaM/s1600/post-screen.png 645×525 *]

Viz též „Add A Meta Box In WordPress »“:http://wpshout.com/create-an-in-post-theme-options-meta-box-in-wordpress/

**Custom Post Type UI**
„http://wordpress.org/extend/plugins/custom-post-type-ui/“:http://wordpress.org/extend/plugins/custom-post-type-ui/
„http://webdevstudios.com/support/wordpress-plugins/“:http://webdevstudios.com/support/wordpress-plugins/

This plugin provides an easy to use interface to create and administer custom post types in WordPress. Plugin can also create custom taxonomies. This plugin is created for WordPress 3.0.

**WP Easy Post Types**
„http://wordpress.org/extend/plugins/easy-post-types/“:http://wordpress.org/extend/plugins/easy-post-types/

This plugin lets you take advantage of the WordPress 3.0 custom post type feature, and create your own post type. The plugin allows you to add a set of fields attached to your new post type, so that in the edit and add new windows a new box will show with the fields defined. Each field added will be saved in the WordPress Database as a custom field, so that you can take advantage of the standard WordPress query rules to list your content on the page template.
Not only can you create and manage new post types but you can create and manage custom fields and meta boxes associated with a particular post type. It comes with a built-in date picker field to help with post types that are date-specific. Another key feature giving this plugin loads of potential is that it allows you manage the admin display of your created post types. For instance, if you wanted a custom field to show up in the posts list screen, you can do that.

**Post Type Switcher**
„http://wordpress.org/extend/plugins/post-type-switcher/“:http://wordpress.org/extend/plugins/post-type-switcher/

A simple way to change a post type in WordPress (one at a time). Any combination is possible, even custom post types.

– Page to Post
– Post to Page
– Post to Custom
– Post to revision/attachment/navigation menu is possible but turned off by default

**Convert Post Types**
„http://wordpress.org/extend/plugins/convert-post-types/“:http://wordpress.org/extend/plugins/convert-post-types/

This is a utility for converting lots of posts or pages to a custom post type (or vice versa). You can limit the conversion to posts in a single category or children of specific page. You can also assign new taxonomy terms, which will be added to the posts‘ existing terms.

*Další informace:*

„A WordPress forum plugin using custom post types“:http://justintadlock.com/archives/2010/07/16/a-wordpress-forum-plugin-using-custom-post-types
„The Essential Guide to WordPress 3.0 Custom Taxonomies“:http://www.1stwebdesigner.com/wordpress/essential-guide-wordpress-custom-taxonomies/

„First Impressions of Custom Post Type“:http://wpengineer.com/impressions-of-custom-post-type/
„Function Reference/register post type“:http://codex.wordpress.org/Function_Reference/register_post_type
„Custom Post Types in WordPress 2.9“:http://www.hostscope.com/templature/custom-post-types-in-wordpress-2-9/
„How To Make WordPress An CMS With Different Post Types“:http://www.knowtebook.com/how-to-make-wordpress-an-cms-with-different-post-types-1627.htm
„Developing Post Types Plugin with WordPress“:http://www.packtpub.com/article/developing-post-types-plugin-with-wordpress
„How to Set Up Custom WordPress Category Templates“:http://mattmedia.net/2007/10/09/how-to-set-up-custom-wordpress-category-templates-in-four-easy-steps/
„Creating single post templates in WordPress“:http://justintadlock.com/archives/2008/12/06/creating-single-post-templates-in-wordpress
„WordPress Single Post Templates“:http://www.nathanrice.net/blog/wordpress-single-post-templates/