Polymer in WordPress

232 views
Skip to first unread message

luan...@gmail.com

unread,
May 27, 2016, 10:20:40 AM5/27/16
to Polymer
Hello

I wanted to know if its possible to install Polymer Elements in a WordPress. I'm interested in using Google Analytics web component.

Thanks!

Daniel Llewellyn

unread,
May 27, 2016, 11:29:29 AM5/27/16
to luan...@gmail.com, Polymer
Yes it is. You will need to edit your WordPress theme, or preferably create a child-theme for your changes so that updates to your theme from the original author don't destroy your changes when you update. 

You will need to add declarations in your child-theme's functions.php file to 'enqueue' the webcomponents polyfill and to output your html imports. Something similar to this would probably be appropriate.

For help with WordPress theming you can find myself and others in FreeNode IRC in the official #WordPress support channel.

Hope this helps.

Daniel Llewellyn.

Sent from Nylas N1, the extensible, open source mail client.
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/aafa5a80-88d5-40f6-a005-65fc65fc8255%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

luan...@gmail.com

unread,
May 28, 2016, 12:14:09 AM5/28/16
to Polymer, luan...@gmail.com
Thank you Daniel!
I'm really new to all of this, is there a way I can get the files required (like webcomponents-lite.js) easily, so I can uploaded them to Wordpress?

Thanks again!
Take care!

Daniel Llewellyn

unread,
May 28, 2016, 6:47:52 AM5/28/16
to luan...@gmail.com, Polymer
I'd recommend the standard process using bower which is documented on the polymer website:

bower install --save GoogleWebComponents/google-analytics

That command should pull everything required for the google-analytics component to be functional.

Sent from Nylas N1, the extensible, open source mail client.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages