Jump to content

Archived

This topic is now archived and is closed to further replies.

flourishdesignstudio

Adding Code to Header File

Recommended Posts

flourishdesignstudio

Hello,

 

I am working on a site that wanted to include a snippet of code (meta property code) in the header file of their site so that they can track their social media properties. Now, this may be obvious but I wanted to confirm before I do anything on their site...

 

Is the place I should put the code under the custom css/less called "DMS Header Scripts Fallback" or is there somewhere else I should add that in?

 

Thanks in advance for the help!

 

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

You should be able to add that code there. However, I would always recommend using a child theme and hook to add any snippets. This way, if the script(s) causes any issues you can simply remove the hook.

 

See here for more info on adding code to your header - http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
flourishdesignstudio

Thanks Danny!

 

I just want to make sure that I didn't use improper terminology in my message. I think that the term snippet might mean something specific which wasn't what I meant....

 

Our client wants to be able to add this in the header:

 

<meta property="fb:admins" content="100003782032277" />

 

so that their Facebook Insights are linked to their site. Is the "DMS Header Scripts" still the correct place to insert this?

 

Thanks Danny!

Share this post


Link to post
Share on other sites
Danny

As far as I am aware you can add that without the need for custom code, by simply using the WordPress SEO by Yoast plugin. See this article for more information - http://www.wpbeginner.com/wp-themes/how-to-add-facebook-open-graph-meta-data-in-wordpress-themes/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • stijnxo
      By stijnxo+
      Is it possible to get the children of the parent page in Powerloop using Custom Taxonomy and Custom term?
    • Bleuy
      By Bleuy+
      How can I get support on pagelines DMS? The product isn't that old and my skeleton themes aren't working and I can't get support in the same way? 
    • Bleuy
      By Bleuy+
      I have a number of legacy websites that are running on the above version of Pagelines DMS, where the template has stopped working. I am using a skeleton theme to all of them. What do I need to do to rectify this.
       
       
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
×