If you want to track just the front page, please paste the pixel code in the file front-page.php. If you want to add it to the header or footer across the website, please edit header.php or footer.php and add the pixel there.
Hello. Thanks for your quick replay.
The problem is that I don’t know exactly were to copy the fb pixel inside front-page.php.
I mean, the location…coz I tried to add it in different locations but the page breaks.
This is the content of my theme’s frontpage php file:
<?php
get_header();
if (is_paged()) {
get_template_part( ‘parts/loop’);
} else {
get_template_part( ‘parts/frontpage’, ‘featured’);
get_template_part( ‘parts/frontpage’, ‘action1’);
get_template_part( ‘parts/frontpage’, ‘about’);
get_template_part( ‘parts/frontpage’, ‘social’);
get_template_part( ‘parts/frontpage’, ‘team’);
get_template_part( ‘parts/frontpage’, ‘action2’);
get_template_part( ‘parts/frontpage’, ‘test’);
get_template_part( ‘parts/frontpage’, ‘news’);
get_template_part( ‘parts/frontpage’, ‘contact’);
}
get_footer();
?>
So, were should I add the code?
Thanks very much!
I think the best place for it would be header.php. Copy it right before the closing </head> tag.