child theme problems with adding some scripts

  • Anonymous


    I wonder why would need to throw that custom header height and width function to your child theme’s functions.php?! You can change the header image height in Graphene Options itself. And, the header width will be changed according to the container width you’ve set in column width settings.



    Ooopss! I really don’t remember it why I did. You’re absolutely right. I think, I was a little tipsy ! :))

    Anyway, I deleted my function.php in my child theme so it is totally free now and after that, except of an app ( sitelock seal ), all other functions work well.

    So…at the moment…

    Could you tell me when I need to insert a snippet code by other websites, where I have to put those codes in my child theme ?

    OK, already I know that, if it is before header I can put it into theme’s advanced option-custom header tag section. But if it should be before </body> tag in theme, so where I have to put it, I dont know.

    Could you make this issue clear for me, please ?


    Kenneth John Odle

    But if it should be before </body> tag in theme, so where I have to put it, I dont know.

    Try dropping it into an action hook widget area. But honestly, it depends upon the code and what it is supposed to do. It is difficult to give you precise instructions without knowing or seeing this code. Does the code documentation say anything?



    Thanks a lot Kenneth for response, actually I’d like to add three apps codes. 2 of them should be inserted before </body> tag in theme and other one before </head> tag. These are simple generated codes by third party website apps. They are quantcast,uservoice and sitelock trust seal apps.

    Which actions hook is the right one,I’m not sure…Could you tell me exactly please ?


    Kenneth John Odle

    Which actions hook is the right one,I’m not sure

    It depends on what they do. If they merely add functionality to your website, you could put them just about anywhere. (The header widget, for example.) If they need to appear in a specific place on each web page, you’ll have to make some educated guesses about which action hook widget area to use.

    I have never heard of these apps and have no familiarity with them. Is there documentation available for them? (iow, throw us a link).





    Quantcast! Seriously?? That’s the only reason why I ditched JetPack plugin. Be careful while using it. There are some privacy issues with it.

    Anyway, if you want to add those scripts before the closing body tag, you can hook the script to wp_footer. Example,

    function my_quantcast_script() {
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">blah

Viewing 7 posts - 11 through 17 (of 17 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.