Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » eCommerce & Atahualpa »

[SOLVED] Need to add a affiliate conversion pixel to a specific page


  #1  
Old May 6, 2014, 06:23 AM
Erwin
 
4 posts · Oct 2011
For a site I have built, I need to add an affiliate program conversion pixel to a 'thank you' page, which is actually a normal page, added through the dashboard.

Since all pages use the index.php of Atahualpa as a template, I would need to add code in there that calls the thank you page by id and then echoes the conversion pixel in that page
The one thing I am not sure of is what code to use to make that pixel echo only on that thank you page.

The pixel code is:
HTML Code:
< ? php
echo <img src= [i]wont bore you with the actual pixel details[/i] alt="" />';
?>
Your help is greatly appreciated!

Last edited by lmilesw; May 6, 2014 at 08:14 AM.
  #2  
Old May 6, 2014, 06:39 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Why not use one of the options in the 'Add HTML/CSS Inserts' option? Just stick it on all pages
Or you could accept a new widget area and a php aware plugin to only show it on that page. That way you won't have to update it after a theme upgrade.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; May 6, 2014 at 06:41 AM.
  #3  
Old May 6, 2014, 06:59 AM
Erwin
 
4 posts · Oct 2011
Don't I feel stupid...

I stripped the:
<?php

echo '

from the pixel, and just added it in a plain text widget to the sidebar. I am using the "Display Widgets" plugin, so only showing it on the specific page is a breeze.


Many thanks for your lighting fast advice!!

Last edited by lmilesw; May 6, 2014 at 08:16 AM.
  #4  
Old May 8, 2014, 06:14 AM
Erwin
 
4 posts · Oct 2011
I was too eager I'm afraid, the pixel wont display correctly.

It seems there is no other way than to edit index.php and modify it each time after an update.

Since I prefer to be safe over being sorry, could you advise if this will work when entered in the index.php of atahualpa:

<?php if (is_page('bedankt-voor-uw-aanvraag') ): ?>

<?php

echo '<img src="https://urlhere.com/?cid=', ($cid = 'IDhere'), '&pid=otheridhere&tid=' . urlencode($order->id) . '&tam=', urlencode(!empty($order->order_total) && !empty($order->order_tax) ? $order->order_total - $order->order_tax : $order->get_formatted_order_total()) ,'&data=', urlencode(!empty($_COOKIE['TT2_' . $cid]) ? $_COOKIE['TT2_' . $cid] : null), '" width="1" height="1" border="0" alt="" />';

?>

<?php endif; ?>
  #5  
Old May 10, 2014, 07:38 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Why not use a plugin like exec-php and put that code in a text widget?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] post-specific header image w/ css insert (page-specific ones work, but not o viewdesigninc Header configuration & styling 10 Oct 1, 2012 04:43 PM
[SOLVED] page menu buttons 1 pixel too high. --yeah--wow Page & Category Menu Bars 2 Jun 1, 2011 08:23 PM
conversion from movable type wppg New Versions, & Updating 0 Nov 21, 2010 07:19 PM
Import/Export Conversion Tool akellstar New Versions, & Updating 1 Aug 8, 2010 04:58 AM


All times are GMT -6. The time now is 12:22 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.