Tagged: x
-
AuthorPosts
-
October 13, 2016 at 6:38 am #1214490
aya.solutionsParticipantHello,
may you can tell me de difference between the:
-
wp-header.php (/wp-content/themes/x/framework/views/your-stack-name)
-
header.php (/wp-content/themes/x)
-
_header.php (/wp-content/themes/x/framework/views/global)
After researching it seems there are different option how to add a code in the “header”
I would like to ad a code from HotJar – I have installed the Child Themeadditional: where do I exactly paste the code in?
Best regards
October 13, 2016 at 6:48 am #1214499
aya.solutionsParticipantThis reply has been marked as private.October 13, 2016 at 10:18 am #1214826
LelyModeratorHi There,
First:
header.php (/wp-content/themes/x)
<?php x_get_view( x_get_stack(), 'wp', 'header' ); ?>
That line of code from that file is calling wp-header.php (wp-header.php (/wp-content/themes/x/framework/views/your-stack-name) from your specific stack. It is made that way for each specific stack designs.Next:
wp-header.php (/wp-content/themes/x/framework/views/your-stack-name)
On this file, you can see first this line:
<?php x_get_view( 'global', '_header' ); ?>
That line calls for third file :_header.php (/wp-content/themes/x/framework/views/global). This file contains the opening of the HTML structure including the headings and body tag opening. This is in global folder because this is present on all stacks.The next content after that line of code are stack specific functionalities.
Hope this helps.
November 11, 2016 at 12:25 pm #1253605
aya.solutionsParticipantThis reply has been marked as private.November 11, 2016 at 6:23 pm #1253885
JadeModeratorHi there,
We can add the code through the child theme’s functions.php:
function my_custom_head_output() { ?> ...code here for the header... <?php } add_action( 'wp_head', 'my_custom_head_output', 99999 ); function my_custom_body_output() { ?> ...code here after the body tag... <?php } add_action( 'x_before_site_begin', 'my_custom_body_output', 99999 );Hope this helps.
November 12, 2016 at 10:35 am #1254481
aya.solutionsParticipantJop – thank you very much
By the way: you are all doing a good job – and your support is awesome 🙂
Best regards
November 12, 2016 at 12:05 pm #1254530
ThaiModeratorYou’re most welcome 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1214490 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
