If you want to print templates from the affiliate toolkit directly into WordPress, you have two options.
Output via WordPress function
You can use the WordPress function do_shortcode and simply use the corresponding AT-Shortcode.
1 |
do_shortcode('[atkp_product id='<product-id>'][/atkp_product]') |
Direct output via AT-Function
Output of a product
If you want to know more about the parameters, look at the Shortcodes (these are identical).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
/* 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 = ''; $hidedisclaimer = false; /* Einbindung eines einzelnen Produktes. Parameter stimmen zum größten Teil mit dem aus dem Shortcodegenerator überein. Evtl. mit diesem die Paramter generieren. */ echo $output->get_product_output($id, $template, $content, $buttontype, $field, $link, $elementcss, $containercss, $hidedisclaimer); } catch(Exception $e) { echo 'Exception: '. $e->getMessage(); } |
Output of a list
If you want to know more about the parameters, look at the Shortcodes (these are identical).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
/* 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; $randomsort = false; $hidedisclaimer = false; /* Einbindung einer kompletten Liste. Parameter stimmen zum größten Teil mit dem aus dem Shortcodegenerator überein. Evtl. mit diesem die Paramter generieren. */ echo $output->get_list_output($id, $template, $content, $buttontype, $elementcss, $containercss, $limit, $randomsort, $hidedisclaimer); } catch(Exception $e) { echo 'Exception: '. $e->getMessage(); } |