Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Show Table of Contents

Override custom taxonomies

affiliate-toolkit registers some custom post types and also taxonomies. Sometimes you may want to override certain parameters that are set by default.

Klicken Sie auf den unteren Button, um den Inhalt von zu laden.

Inhalt laden

Override registered custom post types

This function is called when registering the taxonomies and is used to override the post types.

function atkp_taxonomy_posttypes_callback($taxs, $taxonomyname) {
    //Fügt die Taxonomie "Produktkategorie" auch dem "Beitrags"-Typ hinzu
    if($taxonomyname == 'produktkategorie')
    	array_push($taxs, 'post');
    return $taxs;

add_action('atkp_taxonomy_posttypes', 'atkp_taxonomy_posttypes_callback', 10, 2);
taxesContains the array in which the custom post types for the registry are contained (by default: atkp_product and atkp_fieldgroup depending on the taxonomy).
taxonomynameContains the name of the taxonomy which is registered (e.g. "brand").
Return valueThe modified array with the custom post types.

Override taxonomies for registration

This function is called directly before registration.

function atkp_register_taxonomy_callback($taxargs, $taxonomyname) {
    //Aktiviert für die Taxonomie "marke" die Bearbeitung über das Backend (Standardmäßig ausgeblendet)
    if($taxonomyname == 'marke')
    	$taxargs['show_ui'] = true;
    return $taxargs;

add_action('atkp_register_taxonomy', 'atkp_register_taxonomy_callback', 10, 2);
taxargsContains the array which will be passed to the register_taxonomy function.
taxonomynameContains the name of the taxonomy which is registered (e.g. "brand").
Return valueThe modified array.
Updated: 2. March 2023
Still not using affiliate-toolkit?
Setup takes less than 5 minutes and you can start to import first products!
Learn more about the packagesDownload FREE Version
Still need help?
Submit Your Question
Please give us the details, our support team will get back to you.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram