child theme problems with adding some scripts

  • Anonymous

    #33205

    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.

    Anonymous

    #33206

    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 ?

    Mod

    Kenneth John Odle

    #33207
    Quote:
    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?

    Anonymous

    #33208

    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 ?

    Mod

    Kenneth John Odle

    #33209
    Quote:
    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).

    Anonymous

    #33210

    Anonymous

    #33211

    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="http://quantcast.com/quantcast.js"></script>
    <script type="text/javascript">blah
    blah
    blah
    </script>
    <?php
    }
    add_action('wp_footer','my_quantcast_script');
Viewing 7 posts - 11 through 17 (of 17 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!