Redditjs Embed Widget Embed Reddit on your website

Does your site get a lot of posts on reddit? Increase reddit engagement, more comments, more upvotes.

Use script embed codes or use the wordpress plugin

Post embed widget

The post widget will embed itself onto your WordPress post and detect if it has been posted to reddit.

If it has NOT been posted to reddit it will show a link to encourage the user to submit.

If it has been posted, it will load a widget displaying that reddit post giving the user where they can upvote/comment that post.

This will give you a chat box similar to facebook or disqus comment system. This is excellent for websites that have their content submitted to reddit. It will help increase reddit activity with more upvotes and comments and allow the user to freely navigate reddit.

Instructions

Add this script tag where you want the widget to appear.

This example will embed this current URL that has the most comments on reddit.

<script src='https://redditjs.com/post.js'></script>

Will display:



Options

All of these options are optional.

Name Description values Default data-url The URL you want to search in reddit to embed on your site, or you can put a reddit post id. If the url is http://www.reddit.com/r/technology/comments/2m2yl7/its_now_official_humanity_has_landed_a_probe_on_a/ the post id would be 2m2yl7 any url or reddit post id current URL of your website data-width Width of the post widget. number 500 data-height Height of the post widget. number 500 data-post-finder If the URL has been submitted multiple times to reddit, it will display the most relevant post based on your setting. newest, mostUpvoted, mostComments mostComments data-theme Change the theme light, dark light data-show-submit If we don’t find a post on reddit, should we display a “submit to reddit” widget. true,false true

example light theme

<script src='https://redditjs.com/post.js' data-url='http://www.techodrom.com/etc/star-trek-edges-closer-reality-tractor-beam-moves-object-using-nothing-power-ultrasound/' data-height='500' data-width='650' data-post-finder='mostComments' data-theme='light' data-show-submit='true'></script>

Will display:



example dark theme

<script src='https://redditjs.com/post.js' data-url='http://www.people.com/article/new-zealand-scrabble-champion-french-dictionary' data-height='500' data-width='650' data-post-finder='mostComments' data-theme='dark' data-show-submit='true'></script>

Will display:



Subreddit embed widget

Displays a subreddit feed, these were created as an alternative to this.

Instructions

Add this script tag where you want the subreddit widget to appear.

<script src='https://redditjs.com/subreddit.js'></script>

Will display:



Options

All of these options are optional.

Name Description values Default data-subreddit The subreddit you want to embed any subreddit front data-domain If you want to embed all posts coming from a domain. Do not include if you want to embed a regular subreddit any valid domain null data-width Width of the post widget. number 300 data-height Height of the post widget. number 300 data-sort Sort order of subreddit hot, new, controversial, rising, top, gilded hot data-theme Change the theme light, dark light data-timeframe If top or controversial is select you can show posts from a specific time period. hour,day,week,month,year,all light data-subreddit-mode How you want to display a subreddit normal,small,grid,large normal

example 1, normal subreddit feed

<script src='https://redditjs.com/subreddit.js' data-subreddit='BeavisAndButthead' ></script>

Will display:



example 2, viewing a subreddit in grid mode

<script src='https://redditjs.com/subreddit.js' data-subreddit='BeavisAndButthead' data-height='500' data-width='500' data-sort='top' data-theme='light' data-timeframe='month' data-subreddit-mode='grid'></script>

Will display:



example 3, dark theme with thumbnails

<script src='https://redditjs.com/subreddit.js' data-subreddit='aww' data-height='400' data-width='330' data-sort='hot' data-theme='dark' data-subreddit-mode='small' ></script>

Will display:



If you don’t want to use the script tags, you can use the wordpress plugin.