Instantly share code, notes, and snippets.

View wordpress_jetpack_subscription_shortcodes.php
/*
The Wordpress Jetpack plugin offers a subscription widget that can be added via shortcodes.
To enable:
1. Open the Wordpress template file (e.g. footer.php) containing the desired location of the widget.
These are located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your template file in the required location.
3. Replace the [PARAMETER n] values with your desired values.
4. Save to have the changes take effect.
View wordpress_add_widget_area_to_footer.php
View wordpress_addtoany_rss_feed.php
/*
The AddToAny plugin is a great (and inobtrusive) way to add social sharing buttons to Wordpress posts.
It does not natively include RSS feed support however. To rectify that:
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your functions.php
3. Save to have the changes take effect.
*/
View wordpress_thumbnails_in_rss_feed.php
/*
By default Wordpress does not include post thumbnails in RSS feeds.
To enable:
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your functions.php
3. Save to have the changes take effect.
*/
View wordpress_disable_self_pings.php
/*
By default Wordpress will ping itself with each internal link.
This is annoying and a tad inefficient. To disable:
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your functions.php
3. Save to have the changes take effect.
*/
function disable_self_pings( &$links ) {
View wordpress_author_comment_highlight.css
/*
Styling the bypostauthor CSS class allows author comments to stand out.
Apply the style via the Wordpress theme customiser:
1. Open your site's Wordpress Dashboard
2. Select the Appearance / Customise menu item
3. On the Customise screen select the Additional CSS menu item
4. Paste the code snippet below, and modify to blend with your theme.
*/