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

Tag: Code Snippets

Best Of WordPress Code Snippets Collection – 5

Programming-7

How To Show Top Level And Child Pages In WordPress

The following snippet will let you show top level and child pages in WordPress.

How To Have A/B Split Google Optimizer For WordPress

The following snippet will like you to have A/B split Google optimizer testing done for WordPress.

Snippet Source/Credit: Snipplr

How To Have Content From Separate Pages Without ID In WordPress

The following lines of codes will let you have content from separate pages without ID in WordPress.

How To Add Gravatars For Authors In WordPress

Simply paste the following snippet and you will be able to automatically add the author gravatar to each of their posts respectively.

Snippet Source/Credit: emoticode

How To Add PayPal Functionality In WordPress

Using the following snippet will let you add PayPal button to your WordPress website. Remember to add the snippet to your theme’s functions.php file and you are done.

Snippet Source/Credit: Snipplr

Best Of WordPress Code Snippets Collection – 4

Programming-6

How To Set Simple Embedding PDF Shortcode In WordPress

The following snippet will let you set simple embedding PDF shortcode in WordPress.

Snippet Source/Credit: WPRecipes.com

Setting Up WordPress Post Expiration Code

The following snippet will let you set WordPress post expiration code.

Snippet Source/Credit: nrbet.com

How To Delete Post From Front End In WordPress

Adding the following snippet will let you delete post from front end in WordPress.

Snippet Source/Credit: WordPress.org

How To Show Repeatable Region In WordPress Simple Fields Plugin

The following snippet will let you see repeatable region in WordPress simple fields plugin.

How To Fix UTF-8 Issues In WordPress

Adding the following lines of code will let you fix UTF-8 issues in WordPress.

Follow these steps:

(see “Performing the actual conversion on your live database” section)

THEN install this plugin:

(fixes UTF8 encoding IN titles).

Snippet/Source Credit: Snipplr

Best Of WordPress Code Snippets Collection – 3

Programming-4

How To Fix Visual Formatting

The following snippet will let you fix visual formatting.

How To Make Accessible Menu Editor In WordPress

Adding the following snippet to your theme’s functions.php file, you will be able to make accessible menu editor.

Snippet Source/Credit: Webundso

How To Simulate A View Of A Page With JavaScript Onclick

Using the following snippet, you will be able to simulate a view of a page with JavaScript onclick.

Snippet Source/Credit: Reiffs.dk

How To Make Your Search Results Unlimited

Start by finding the below code in your search.php file:

Once you found it, simply replace it with:

Snippet Source/Credit: WPHacks

How To Redirect Users To A Random Post In WordPress

Pasting the following snippet to your page-random.php file will let you redirect users to a random post.

Snippet Source/Credit: Smashing Magazine

Best Of WordPress Code Snippets Collection – 2

Programming-1

How To Embed A Page Into Another Page In WordPress

Using the following snippet, you will be able to embed a page into another page in your WordPress blog.

Snippet Source/Credit: CSS Tricks

How To Rearrange Categories Order In WordPress

Adding the following snippet to your theme’s functions.php file, you will be able to rearrange WordPress categories order, completely the way you want it.

Snippet Source/Credit: Sebastian

How To Make Your Search Results Unlimited In WordPress

Start by finding the below code in your search.php file:

Once you found it, simply replace it with:

Snippet Source/Credit: WPHacks

How To Prevent WordPress To Compress JPG Files

Copy and paste the following snippet in your theme’s functions.php file and it will let you prevent WordPress to compress your jpg files.

Snippet Source/Credit: WP Snippets

How To Display An Advert After The First Post In WordPress

The following snippet will let you display an advert after the first post in WordPress.

Snippet Source/Credit: WPLift

Best Of WordPress Code Snippets Collection – 1

Programming-2

How To Disable Comments Completely In WordPress

Adding the following snippet will let you disable Word Press comments completely.

Snippet Source/Credit: aotearoawebdesign.co.nz

How To Limit Posts Per Page On Search In WordPress

Using the following snippet will let you limit posts per page on search page in WordPress.

Snippet Source/Credit: WordPress.org

Fixing HTTP Error In WordPress

Using the following snippet in your theme’s .htaccess code will let you fix HTTP error in WordPress.

How To Know That Which Theme You Are Using

Adding the following lines of code will let you know that which theme you are using.

Snippet Source/Credit: Snipplr

How To Change Editor Font In WordPress

Using the snippet below and you will be able to change the font the way you want.

Snippet Source/Credit: DevPress

How To Disable Plugins Update In Your WordPress Blog

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

Snippet Source/Credit: WP Snippets

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

Powered by WordPress & Theme by Anders Norén