Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1027818
    XperiSoft Marketing
    Participant

    I need to add a tracking code to the header.php, and get this message:
    <?php

    // =============================================================================
    // HEADER.PHP
    // —————————————————————————–
    // The site header. Variable output across different stacks.
    //
    // Content is output based on which Stack has been selected in the Customizer.
    // To view and/or edit the markup of your Stack’s index, first go to “views”
    // inside the “framework” subdirectory. Once inside, find your Stack’s folder
    // and look for a file called “wp-header.php,” where you’ll be able to find the
    // appropriate output.
    // =============================================================================

    ?>

    <?php x_get_view( x_get_stack(), ‘wp’, ‘header’ ); ?>

    I see that I need to go to wordpress/x/theme from another forum thread but cannot find this template to edit.

    could someone please let me know how to do this please

    thanks

    #1027936
    Christopher
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Please add following code in child theme’s functions.php file :

    function third_party_tracking_code() { ?>
    
      <script>
        // Third party tracking code.
      </script>
    
    <?php }
    
    add_action( 'wp_head', 'third_party_tracking_code' );

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1027818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>