Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #778639

    Hey,

    This code should be added under the <head> tag

    <!– TradeDoubler site verification 2949131 –>
    Where should I add it?

    Thanks
    Charlotte
    http://www.newyorkhotellbokning.se/

    #778656

    Hi Charlotte :)

    Please add following code to Functions.php file in Appearance > Editor

    function my_custom_code(){
    ?> 
    //Your code goes here
    

    Regards,
    Yigit

    #778664

    Hey,

    I get this when I add the code
    Parse error: syntax error, unexpected $end in /home/d8737/newyorkhotellbokning.se/wp-content/themes/enfold-child/functions.php on line 13

    #778693

    function my_custom_code(){
    ?>
    //<!– TradeDoubler site verification 2949131 –>
    < ?php
    }
    add_action(‘wp_head’, ‘my_custom_code’);

    #778748

    Hi charlotteraboff,

    Try like this:

    
    function my_custom_code(){
    	echo "<!– TradeDoubler site verification 2949131 –>";
    }
    add_action('wp_head', 'my_custom_code');
    

    Best regards,
    Victoria

    #778798

    Thanks Victoria.
    I didn’t get the error now but is it under the head tag? Because when I try to verified the website through tradedoubler is does not recognised it.

    #778804

    Hey Charlotte!

    I noticed an extra space in the first code i posted. Please try the code as following

    function my_custom_code(){
    ?> 
    //Your code goes here
    <?php
    }
    add_action('wp_head', 'my_custom_code');

    Cheers!
    Yigit

    • This reply was modified 7 years, 8 months ago by Yigit.
    #778819

    Thanks Yigit..
    but // is visible on main page now… in the left hand side corner

    #778845

    Hey Charlotte,

    It is there just to comment out the line. Please remove // from the beginning of your code

    Cheers!
    Yigit

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.