Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #853209

    ICD
    Participant

    Hi Themeco,
    I searched for this topic and found a few articles, however neither solutions seemed to have worked for me. I need to add the following code to the Header:
    <span id=”papname”></span>
    <span id=”papemail”></span>
    <script src=”http://PRO-direct.postaffiliatepro.com/plugins/AffiliateInfo/affiliateinfo.php?param=all” type=”text/javascript”></script>

    It should show the name and email of a person, according to the link that was clicked or entered. Example: http://providers.direct/test1 = Test 1, webmaster@providers

    Instructions for this are here: https://support.qualityunit.com/903509-Affiliate-info-in-external-page

    I have a X-Child theme installed and i understand that the code should go in the functions.php, i just could not get it to work and removed it.

    URL: http://providers.direct
    WP version 4.4.2
    Cornerstone version 1.1.3
    X version 4.3.4

    Your assistance is highly appreciated,
    Peter

    #853255

    Friech
    Moderator

    Hi Peter,

    Thanks for writing in! You can add the code below to your child theme’s functions.php file:

    add_action('wp_head','my_affiliateInfo');
    function my_affiliateInfo () { ?>
    <script src="http://PRO-direct.postaffiliatepro.com/plugins/AffiliateInfo/affiliateinfo.php?param=all" type="text/javascript"></script>
    <?php }

    And then place the HTML code below to where you want to show the name and email.

    <span id="papname"></span>
    <span id="papemail"></span>

    It can be on the Topbar Content, or Raw Content element in Cornerstone, or Widget text.

    Hope it helps, Cheers!

    #853913

    ICD
    Participant

    Thank you!
    1. Oddly, the name and email are not showing up. I put the <span> code in the topbar, but its not showing up http://providers.direct/Test1/
    I also put it in the body (raw content) above the footer, also nothing. Cookies and cache have been cleared, tried in Chrome, Edge and Firefox.
    What did i do wrong?

    2. I also need to put script in the footer for click tracking, would i add this in functions.php:
    add_action(‘wp_footer’,’my_clicktracking’);
    function my_clicktracking () { ?>
    <script> whatever </script>
    <?php }

    #853948

    Christian
    Moderator

    It sounds like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Thank you for your understanding.

    #853961

    ICD
    Participant

    OK, so i guess that means i did it correctly as you instructed. I do understand that you cannot help with 3rd party script, i just wanted to make sure i did it right.

    What about my second question, would i add the code as i mentioned into the function.php file like that? I don’t know .php, so i just want to make sure i guesses “wp_footer” right. You used ‘wp_head’ in the first script, so i was guessing ‘wp_footer’, or does that even matter?

    Thanks.

    #853981

    Rue Nel
    Moderator

    Hello There,

    2] Since you already have your child theme active and ready, simply insert this following code in your child theme’s functions.php file

    add_action('wp_footer','my_clicktracking');
    function my_clicktracking () { ?>
    <script> whatever </script>
    <?php }

    This functions will add the click tracking code in your wp_footer.

    Hope this helps.

    #853983

    ICD
    Participant

    Great, thank you very much! I’ll figure out the issue regarding the first script with the developer.
    And thank you for your prompt responses on a Saturday late at night.
    Peter

    #853990

    Rue Nel
    Moderator

    Don’t mention it!
    It’s the least that we can do for you.