Title: Pinterest theme causing javascript error
Last modified: August 30, 2016

---

# Pinterest theme causing javascript error

 *  [jamiechong](https://wordpress.org/support/users/jamiechong/)
 * (@jamiechong)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pinterest-theme-causing-javascript-error/)
 * For some reason the plugin is enqueuing scripts and styles on pages such as the
   [home page](http://momentummag.com/) and the [shopping](http://momentummag.com/shop/)
   pages. Shouldn’t the plugin exclude itself from anything where post_type != ‘
   post’ ?
 * The javascript error is `Uncaught TypeError: Cannot read property 'top' of undefined`
   
   And it’s coming from this file: `/wp-content/plugins/wordpress-23-related-posts-
   plugin/static/js/pinterest.js?ver=3.5.4`
 * [http://momentummag.com/](http://momentummag.com/)
 * [https://wordpress.org/plugins/related-posts-by-zemanta/](https://wordpress.org/plugins/related-posts-by-zemanta/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [jamiechong](https://wordpress.org/support/users/jamiechong/)
 * (@jamiechong)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pinterest-theme-causing-javascript-error/#post-6504598)
 * Note that we disabled the pinterest theme for now, so the links above won’t show
   the error.
 *  [PetraP](https://wordpress.org/support/users/petrap/)
 * (@petrap)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/pinterest-theme-causing-javascript-error/#post-6504896)
 * Hey Jamie,
 * thanks for reaching out and sorry for this one month overdue reply!
 * I have checked out your blog and noticed you are still using our plugin – thanks!
   As far as the Pinterest theme goes, the only reason we have not removed it yet
   is because on standard WP themes it usually works and users really like it. But
   when it doesn’t work, it really does not want to work :/
    Still weird that it
   popped up on pages though…have you maybe had the plugin installed before and 
   entered manually to have related posts shown in pages? Do you have any other 
   plugin Pinterest related installed and some weird conflict is going on here?
 * Once again, my apologies for the unintentional silent treatment, take care and
   have a lovely day,
    Petra

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Pinterest theme causing javascript error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/related-posts-by-zemanta_7b9a7c.svg)
 * [Related Posts by Sovrn](https://wordpress.org/plugins/related-posts-by-zemanta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/related-posts-by-zemanta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/related-posts-by-zemanta/)
 * [Active Topics](https://wordpress.org/support/plugin/related-posts-by-zemanta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/related-posts-by-zemanta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/related-posts-by-zemanta/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [PetraP](https://wordpress.org/support/users/petrap/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/pinterest-theme-causing-javascript-error/#post-6504896)
 * Status: not resolved