Möchtest du Vorlagen vom Affiliate-Toolkit direkt in WordPress ausgeben, hast du zwei Möglichkeiten.
Ausgabe mittels WordPress-Funktion
Du kannst dafür die WordPress-Funktion do_shortcode verwenden und einfach den entsprechenden AT-Shortcode verwenden.
1 |
do_shortcode('[atkp_product id='<product-id>'][/atkp_product]') |
Direkte Ausgabe mittels AT-Funktion
Ausgabe eines Produktes
Falls du mehr zu den Parametern wissen willst, sieh dir die Shortcodes an (diese sind ident).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
/* Bindet die Ausgabe-Funktionen vom Plugin direkt ein */ require_once ATKP_PLUGIN_DIR.'/includes/atkp_output.php'; $output = new atkp_output(); try { /*$id ist die Produkt-ID aus dem Wordpress-Customposttype*/ $id = 4959; $content =''; $template = 'box'; $buttontype = 'notset'; $field =''; $link = false; $elementcss = ''; $containercss = ''; /*Alle Parameter ab $hidedisclaimer sind optional */ $hidedisclaimer = false; $tracking_id=''; $offerstemplate= ''; $imagetemplate = ''; /* Einbindung eines einzelnen Produktes. Parameter stimmen zum größten Teil mit dem aus dem Shortcodegenerator überein. Evtl. mit diesem die Parameter generieren. */ echo $output->get_product_output($id, $template, $content, $buttontype, $field, $link, $elementcss, $containercss, $hidedisclaimer, $tracking_id, $offerstemplate, $imagetemplate); } catch(Exception $e) { echo 'Exception: '. $e->getMessage(); } |
Ausgabe einer Liste
Falls du mehr zu den Parametern wissen willst, sieh dir die Shortcodes an (diese sind ident).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
/* Bindet die Ausgabe-Funktionen vom Plugin direkt ein */ require_once ATKP_PLUGIN_DIR.'/includes/atkp_output.php'; $output = new atkp_output(); try { /*$id ist die Listen-ID aus dem Wordpress-Customposttype*/ $id = 4945; $content =''; $template = 'wide'; $buttontype = 'notset'; $elementcss = ''; $containercss = ''; $limit = 10; /*Alle Parameter ab $randomsort sind optional */ $randomsort = false; $hidedisclaimer = false; $tracking_id =''; $product_ids = array(); $offerstemplate= ''; $imagetemplate = ''; $parseparams = false; $itemsPerPage = 0; $filter = ''; /* Einbindung einer kompletten Liste. Parameter stimmen zum größten Teil mit dem aus dem Shortcodegenerator überein. Evtl. mit diesem die Parameter generieren. */ echo $output->get_list_output($id, $template, $content, $buttontype, $elementcss, $containercss, $limit, $randomsort, $hidedisclaimer, $tracking_id, $product_ids, $offerstemplate, $imagetemplate, $parseparams, $itemsPerPage, $filter); } catch(Exception $e) { echo 'Exception: '. $e->getMessage(); } |
Ausgabe eines Suchformulars
Falls du mehr zu den Parametern wissen willst, sieh dir die Shortcodes an (diese sind ident).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
/* Bindet die Ausgabe-Funktionen vom Plugin direkt ein */ require_once ATKP_PLUGIN_DIR.'/includes/atkp_output.php'; $output = new atkp_output(); try { /*Alle Parameter sind optional */ $template = 'default'; $targetpage = 0; $content =''; /* Einbindung eines Suchformulars. Parameter stimmen zum größten Teil mit dem aus dem Shortcodegenerator überein. Evtl. mit diesem die Parameter generieren. */ echo $output->get_searchform_output($template, $targetpage, $content); } catch(Exception $e) { echo 'Exception: '. $e->getMessage(); } |