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

Tag: WordPress Snippets Page 1 of 6

The Snippets Collection – 5

wordpress-logo

How To Make Term Edition Easier

Using the following snippet, you will be able to make term edition easier.

Once saved, add the following line of snippet on any category, tag or taxonomy template:

Snippet Source/Credit: Joost de Valk

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 Rearrange WordPress Categories Order

Using the following snippet, you will be able to rearrange WordPress categories order.

Snippet Source/Credit: Sebastian

How To Remove WordPress Version Number

Using the following snippet, you will be able to remove WordPress version number.

Snippet Source/Credit: Jeff Starr

How To Easily Get Post Content By ID

Using the following snippet will let you easily get post content by ID. All you have to do is to simply use the get_post_field() function to get the post content and you are done.

How To Prevent WordPress To Compress Your JPG Files

The following snippet will let you prevent WordPress to compress your JPG files.

Snippet Source/Credit: WP Snippets

The Snippets Collection – 4

WordPress-Media-Upload

How To Automatically Add Post Name To The Body Class

The following snippet will let you automatically add post name to the body class.

Snippet source/Credit: WPProgrammer.com

How To Add An Extra Contact Methods To User Profiles

The following snippet will let you add an extra contact methods to user profiles.

Snippet Source/Credit: TutsPlus

How to change WordPress editor font

Using the following snippet, you will be able to change WordPress editor font.

Snippet Source/Credit: DevPress

How To Automatically Obfuscate Email Addresses

The following snippet will let you automatically obfuscate email addresses.

Snippet Source/Credit: WordPress Codex

How To Disable Plugins Update In WordPress

The following snippet will let you disable plugins update in WordPress.

Snippet Source/Credit: WP Snippets

The Snippets Collection – 3

WordPress

How To Load All Posts From The Current Week

Using the following snippet, you will be able to load all posts from the current week.

Source Snippet/Code: Christian Brückner

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 Add A Custom Message To The Editor Pane

Using the following snippet, you will be able to add a custom message to the editor pane.

Snippet Source/Credit: WP Tuts

How To Limit Posts Per Page On Search

The following snippet will let you limit posts per page on search.

Snippet Source/Credit: WordPress.org

How To Log-in A WordPress User Programmatically

The following snippet will let you log-in a WordPress user programmatically.

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

Snippet Source/Credit: emoticode

The Snippets Collection – 2

WordPress

How To Load jQuery From Google CDN

WordPress by default load its own jQuery in your theme BUT using the following snippet in your theme’s functions.php file will load the library directly from Google CDN.

Snippet Source/Credit: WP Tips

Adding Paragraph Tags Automatically In Your WordPress Blog

Using the following snippet, you will be able to add paragraph tags automatically in your WordPress blog.

Snippet Source/Credit: Daniel Pataki

Changing Author URL Base

The following snippet will let you change author URL base.

Snippet Source/Credit: Kevin Chard

How To Redirect To A Custom Page After Registration

The following snippet will let you redirect to a custom page once registration got completed. Simply copy the snippet and paste it to your theme’s functions.php file.

Snippet Source/Credit: TheDeadMedic

Changing WordPress Login Logo Title Attribute

Using the following snippet, you will be able to change WordPress login logo title attribute.

Snippet Source/Credit: Dave Clements

The Snippets Collection – 1

wordpress-logo

How To Remove Login Shake Effect At The Time When Error Occurs

Using the following snippet will let you remove the login shake effect when error occurs. Simply paste the following code in your theme’s functions.php file and you are done.

Snippet Source/Credit: WordPress Support Forum

How To Automatically Add Twitter And Facebook Buttons To Your Posts

Using the following snippet, you will be able to automatically add both Twitter and Facebook buttons to your posts.

Snippet Source/Credit: WPRecipes

How To Get The First Link In Post

Using the following snippet and pasting it in your theme’s functions.php file will let you grab the first link in the post.

Snippet Source/Credit: Filip Stefansson

How To Get Email Alerts For 404 Pages In WordPress

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

Snippet Source/Credit: WP Mix

How To Display Recently Registered Users

Using the following snippet, you will be able to display recently registered users.

Snippet Source/Credit: emoticode

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

Page 1 of 6

Powered by WordPress & Theme by Anders Norén