Header breaks revolution slider

Hi!

We need to add a snippet into the head of the site. For this purpose, we copied “x/framework/views/header/base.php” into the child theme, same path. For some reason, just copying that file breaks the revolution slider video that we have set up on the homepage. I thought maybe the file was looking for the “masthead.php” file that is on the same folder, so I copied that file as well to the child theme, but the same happens.

Can you shed some light?

Hi amebadiseño,

To add the scripts to the head of the website please follow the steps below:

  1. Install the Child Theme following this guide.
  2. Add the code below to functions.php file of the child theme:
add_action('wp_head', 'head_information', 9999);

function head_information () { ?>
<!-- Your HTML Code Here -->
<?php }

Replace <!-- Your HTML Code Here --> with the code snippet that you want to add to the head of the website.

Please read this article for more information about the case.

Thank you.

1 Like

Thanks!
That worked.

  1. Why does this happen if we copy that file to the child theme?
  2. I suggest that you include a warning/note comment on “header/base.php” about this.

Hey There,

1.) The issue occurred because you may have inserted an invalid code which messed the the slider or the whole page element structure.

2.) Yes it will be noted and taken into consideration.

Just keep in mind that if you want to add some custom codes in the header or footer of the site, it is best that you use “Insert Headers and Footers” plugin so that you can easily manage all those added scripts or codes in one place.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.