• Resolved Hypno_Pboro

    (@hypno_pboro)


    Hi, I’m using Celestial Lite for my website and have used a Child Theme to edit the stylesheet to make certain amendments.

    I’d now like to add a Google customer survey, however, it specifies adding the given snippet between <>Head and <>/Head and I’m not sure if I can do this with Celestial Lite.

    Am I missing something obvious?

    Can I use Celestial Lite Child: Stylesheet (style.css) to do this?

    Any suggestions?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can use the wp_head action to output code to the <head>...</head> section. In your child theme’s functions.php, use code like this:

    <?php
    function add_google_survey() {
      ... add given snippet here ...
    }
    add_action( 'wp_head', 'add_google_survey' );
    Thread Starter Hypno_Pboro

    (@hypno_pboro)

    Hi, thank you for the speedy reply. Since posting I ran a search on the various plugins that came up for “Head” and uploaded Head Meta Data v20140923. It appears to be giving me what I want.

    Would using the child theme as you suggest be ‘better’ or are both equal for usefulness?

    Both are pretty much the same; I only suggested using a child theme because you said you already had one, so I figured it would be the path of least resistance. One advantage of using a plugin, though, is that if you decide to change themes later, the plugin will still be active, whereas if you used a child theme, you would have to make a child theme for the new parent theme.

    Thread Starter Hypno_Pboro

    (@hypno_pboro)

    I see what you mean. On that basis I’ll stick with the plug in for now. Thanks.

    Well that made my job easier; thanks everyone 🙂
    I’m assuming this topic can be set to Resolved?

    Thread Starter Hypno_Pboro

    (@hypno_pboro)

    Sorry, I missed that. Now resolved.

    Thanks all.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I access Head to add google survey code?’ is closed to new replies.