Programming-4

Loading All Posts From The Current Week

The following snippet will allow you to load all the posts from the current week.

Source: MarketPress – Christian Brückner

Breadcrumb Without Plugin

While there are numbers of plugins available to breadcrumb your WordPress blog or website BUT what if you can do the same with simply adding the following snippet at your theme’s functions.php file.

Once done, open header.php and call the function:

Source: emoticode.net

Changing Dashboard Help Tab Contents

Using the following snippet, you will be able to change the contents of your dashboard help tab.

Source: WP Tuts

Automatically Adding Paragraph Tags

While using the wpautop(), WordPress itself add paragraph tags to the content and the excerpt BUT if in case you requires to add paragraph tags to any text automatically, then use the following snippet for the purpose.

Source: Daniel Pataki

How To Login In A WordPress User Programmatically

The following snippet will allow you to login in a WordPress user programmatically.

Followed by, to log in a user, do the following:

Source: evilsocket

Bringing Single-Column Dashboard Back To WordPress 3.8

With recently introduced WordPress 3.8, a whole new way to display the dashboard BUT if in case, you don’t like the way, then adding the following snippet to your theme’s functions.php will let you bring back single-column dashboard.

Source: Jeff Starr

Ordering Posts By Two Meta Values

By default, WordPress allows you to sort results of a query by one meta value, BUT if you want to order posts by two meta values, then adding the following snippet will help.

Source: WP Recipes

Displaying Recently Registered Users

The following snippet will display recently registered users.

Source: emoticode.net