Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1290295

    JamesAndMathis
    Participant

    Hi Theme support,

    I tried to insert the facbook code pixel and put the code in the function.php page but I delete some line of code and Itried to fixe it but did’nt work out. Now I have this message of error

    Parse error: syntax error, unexpected ‘<‘ in /home/content/38/11590838/html/arevelation/wp-content/themes/x-child/functions.php on line 27

    Can you help please to fix it ?
    Thank you!
    Pat

    #1290327

    JamesAndMathis
    Participant

    Here’s the code. I don’t know what’s missing.
    Thank you!
    Pat

    
    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    // Additional Functions
    // =============================================================================
    
    // =============================================================================
    // =============================================================================
    
    
    #1290349

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! You haven’t provided the code that you have tried to add into your functions.php file. Please provide us with the code, so that we can assist you.

    Thanks!

    #1290353

    JamesAndMathis
    Participant

    Hi Darshana.
    I tried to insert the Facebook Pixer code

    <!– Facebook Pixel Code –>

    <script>

    !function(f,b,e,v,n,t,s)

    {if(f.fbq)return;n=f.fbq=function(){n.callMethod?

    n.callMethod.apply(n,arguments):n.queue.push(arguments)};

    if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;

    n.queue=[];t=b.createElement(e);t.async=!0;

    t.src=v;s=b.getElementsByTagName(e)[0];

    s.parentNode.insertBefore(t,s)}(window,document,’script’,

    ‘https://connect.facebook.net/en_US/fbevents.js’);

    fbq(‘init’, ‘1879702745598364’);

    fbq(‘track’, ‘PageView’);

    </script>

    <noscript>

    <img height=”1″ width=”1″

    src=”https://www.facebook.com/tr?id=1879702745598364&ev=PageView

    &noscript=1″/>

    </noscript>

    <!– End Facebook Pixel Code –>

    And I place, in the other post above, the code what I have right now because I delete the Facebook pixel code.

    #1290462

    Darshana
    Moderator

    Hi there,

    In that case, please follow this example code here and place your code (https://community.theme.co/forums/topic/facebook-tracking-pixel-2/#post-307619).

    Here’s another example (https://community.theme.co/forums/topic/facebook-pixel-code/#post-817969).

    Hope that helps.

    #1290520

    JamesAndMathis
    Participant

    Hi, it doesn’t work. I still have the same error

    Parse error: syntax error, unexpected ‘<‘ in /home/content/38/11590838/html/arevelation/wp-content/themes/x-child/functions.php on line 27

    And now,it’s worst I don’t have access to my website. I really need help on that. My website is now down.

    Can I have an example of code for child theme Integrity that I can copy and paste in my function.php ?

    #1290824

    Friech
    Moderator

    Hi There,

    So you’re editing your theme’s functions.php file from the dashboard editor? We do not advice that. Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1291353

    JamesAndMathis
    Participant

    Hi Friech,
    I resolved my problem
    Thank you,
    Pat

    #1291421

    Thai
    Moderator

    If you need anything else please let us know.