WordPress Themes, Plugins, Tutorials, Tips And More...

Category: Snippets Page 4 of 14

Snippets

Snippets Collection Part – 2

Programming-2

How To Add A Google+ Button To Your Posts

Using the following snippet, you will be able to add a Google+ button to your posts.

Snippet Source/Credit: SpyResStudios

How To Add Gravatars For The Post Author

Using the following snippet, you will be able to add Gravatars for the post author.

Snippet Source/Credit: emoticode

How To Change Author URL Base

Using the following snippet, you will be able to change author URL base.

Snippet Source/Credit: Kevin Chard

How To Redirect To A Custom Page After Registration

Using the following snippet, you will be able to redirect to a custom page after registration.

Snippet Source/Credit: TheDeadMedic

Snippets Collection Part – 1

Programming-4

How To Completely Shut Down WordPress Search

Using the following snippet, you will be able to shut down WordPress search completely.

Snippet Source/Credit: WPEngineer

How To Enlight Searched Text In Search Results

Using the following snippet, you will be able to enlight searched text in search results.

And now just before the line you modified, add this code of lines:

Once done, now open style.css and append the following line to it:

Snippet Source/Credit: Yoast

How To Automatically Add Facebook Open Graph To Your Posts

Adding the following snippet in your WordPress theme’s functions file, you will be automatically able to add Facebook open graph to your posts.

Once done, now open your header.php and replace the <html> tag with:

Snippet Source/Credit: WP Tutsplus

How To Redirect To First Post If Only One Post Is Found

Using the following snippet, you will be able to redirect to first post if only one post is found.

Snippet Source/Credit: Paulund.co.uk

How To Make Your WordPress Website SEO Friendly Without A Plugin

Using the following snippet, you will be able to make your WordPress website SEO friendly without a plugin.

Once done, simply replace the $default_keywords in line 3 with your own keywords and add the following line of code into your theme’s header.php file.

Snippet Source/Credit: Jeff Starr

Best Of WordPress Snippets Collection Part – 5

Programming-1

Creating Custom Post Type FAQ In WordPress

The following snippet will let you create custom post type FAQ.

Snippet Source/Credit: rentageekmom.com

How To Secure Your Uploads Directory In WordPress

Using the following snippet, you will be able to secure uploads directory in WordPress.

Snippet Source/Credit: Jeff Starr

How To Get Email Alerts For 404 Pages In Website

Using the following snippet, you will be able to get email alerts for 404 pages.

Snippet Source/Credit: WP Mix

How To Modify Size Of Embedded Videos

Simply paste the following snippet on your functions.php file and you will be able to modify the size of embedded videos as per your requirements.

Snippet Source/Credit: Shailan

How To Test Whether A Plugin Is Active In WordPress

Using the following snippet, you will be able to test whether a plugin is active or not.

Snippet Credit/Source: CatsWhoCode

How To Change The Post Updated Message Itself In WordPress

The use of the following snippet will let you change the post updated message itself. All you have to do is to simply insert the snippet and you are done.

Snippet Source/Credit: Snipplr

Best Of WordPress Snippets Collection Part – 4

Programming-2

How To Remove Widgets From WordPress Dashboard

Using the following snippet, you will be able to remove widgets from WordPress dashboard.

Snippet Source/Credit: WP Guru

How To Remove WordPress Version

Adding the following snippet in your functions.php file and you will be able to remove WordPress version number.

Snippet Source/Credit: Jeff Starr

How To Log-in A WordPress User Programmatically

Using the following snippet in your theme’s functions.php file, you will be able to log-in a WordPress user programmatically.

Once done, now to log-in a user, just simply do the following:

Snippet Source/Credit: emoticode

How To Make Your WordPress Website SEO Friendly

Adding the following code in your theme’s functions.php file, you will be able to make your website SEO friendly.

Once done, simply replace the $default_keywords in line 3 with your own keywords and add the following line of code into your theme’s header.php file.

Snippet Source/Credit: Jeff Starr

How To Add Theme Style To TinyMCE In WordPress

Using the snippet below you will be able to add theme style to style.css of the theme.

Snippet Source/Credit: eckstein.id.au

Best Of WordPress Snippets Collection Part – 3

Programming-4

How To Disable Post Revision In WordPress

Simply add the following snippet to your theme’s wp-config.php file and you will be able to disable WordPress post revision.

Snippet source/Credit: lesterchan.net

How To Have WordPress Domain Check

Using the following snippet will let you have your WordPress domain check.

Snippet Source/Credit: Snipplr

How To Speed Up Your Blog By Adding Caching Custom Queries

Using the following snippet, you will be able to speed up your blog by adding caching custom queries.

Snippet Source/Credit: WordPress Codex

How To Remove News Feed In WordPress Dashboard

The following snippet will let you remove news feed from your WordPress dashboard.

Snippet Source/Credit: Smashing Magazine

How To Show Content For Logged In Users

Adding this snippet to your theme’s functions.php file will let you show content only for logged in users.

Snippet Source/Credit: Snipplr

Best Of WordPress Snippets Collection Part – 2

WordPress

How To Remove Widgets From WordPress Dashboard

Adding the following snippet in your theme’s functions.php file and you will be able to accomplish the task.

Snippet Source/Credit: WP Guru

How To Disable WordPress Post Revision

Simply add the following snippet to your theme’s wp-config.php file and you will be able to disable WordPress post revision.

Snippet source/Credit: lesterchan.net

How To Remove Default Author Profile Fields

With the help of following snippet, you will be able to remove default author profile fields in WordPress.

Snippet Source/Credit: Snipplr

How To Execute Shortcode From Custom Field

The snippet will let you add shortcode to a WordPress custom field while by default; the option is not available by WordPress.

Snippet Source/Credit: Leeboyce.co.uk

How To Have Login Form For Your Themes

The following snippet will let you have login form for your themes in WordPress.

How To Create Database For WordPress

Using the following snippet, you will be able to create database for WordPress.

Snippet Source/Credit: Snipplr

Best Of WordPress Snippets Collection Part – 1

WordPress Settings

How To Remove Default Author Profile Fields In WordPress

With the help of following snippet, you will be able to remove default author profile fields in WordPress.

Snippet Source/Credit: Snipplr

How To Remove Standard Gallery Style

Adding the following snippet to your theme’s functions.php file, you will be able to remove WordPress standard gallery style.

How To Add Custom Pinterest Button

Using the following snippet will let you add custom pinterest button in your WordPress website.

Add to your header above the body tag

 Edit and add to your page where you want your button to appear.

Snippet Source/Credit: flashalexander.com

How To Add Facebook Comments In Your Website

Using the following line of codes below, you will be able to add Facebook comments in your website.

Snippet Source/Credit: WordPress Codex

Best Of Snippets Collection – 5

Programming-1

How To Redirect Users To A Random Post

Using the following snippet, you will be able to redirect users to a random post.

Snippet Source/Credit: Smashing Magazine

How To Add A Logo To A Template

Using the following snippet, you will be able to add a logo to a template.

Snippet Source/Credit: WPSnipp

How To Set A Maximum Word Count On Post Titles

Adding the following snippet to your theme’s functions.php file, you will be able to set a maximum word count on post titles.

Snippet Source/Credit: Pippin

How To Delete Links In Comments In WordPress

Using the following snippet, you will be able to delete links in comments in WordPress.

Snippet Source/Credit: Snipplr

Best Of Snippets Collection – 4

Programming-7

How To Get Email Alerts For 404 Pages In Website

Using the following snippet, you will be able to get email alerts for 404 pages in website.

Snippet Source/Credit: WP Mix

How To Have Custom Favicon For Your WP-Admin

Using the following snippet, you will be able to have custom favicon for your WP-admin.

Snippet Source/Credit: Snipplr

How To show All Active Plugins In Your WordPress Website

Using the following snippet, you will be able to know about all the active plugins in your WordPress website.

Snippet Source/Credit: Snipplr

How To Rename WordPress Folder

Using the following snippet you will be able to rename WordPress folder.

Snippet Source/Credit: Snipplr

How To Disable Plugins Update In Your WordPress Blog

Using the following snippet, you will be able to disable plugins update in your WordPress blog.

Snippet Source/Credit: WP Snippets

 

Best Of WordPress Snippets Part – 5

Programming-7

How To Integrate The WordPress Media Uploader Into Your Plugin

The following snippet will let you integrate the WordPress media uploader into your plugin.

Snippet Source/Credit: FatFolderDesign

How To No-Follow WordPress Tag Cloud

The following snippet will let you have the no-follow WordPress tag cloud.

Snippet Source/Credit: Snipplr

How To Limit WordPress the_content By Words

With the help of snippet below, you will be able to limit WordPress the_content by words.

Snippet Source/Credit: StackExchange

How To List Author Comments On Author Page

Using the following snippet, you will be able to list all the author comments on authors page.

Snippet Source/Credit: StachExchange

First And Last Result Of WP_Query In WordPress

With the help of snippet below, one can get to know that when was the first and last time, user called the query.

Snippet Source/Credit: Snipplr

Page 4 of 14

Powered by WordPress & Theme by Anders Norén