Sunday 2 February 2014

How To Display Most Recent Posts

In wordpress theming, you need to know basic things like displaying latest posts,displaying posts of category and so on.
In order to display latest and most recent posts here is the following code.
Add the code where you want  to display.

Hide Post View And Post Preview Buttons In Wordpress

Have ever managed of hiding buttons of Post Preview and Post View in admin panel.
If you don't know which buttons we are hiding check out this image.

How To Create Breadcrumbs With Out Plugin

In WordPress, w have almost all plugins but we can create most of the things with out plugins in WordPress.
Many people know about breadcrumbs which helps in providing navigation system of a Blog.
In this tutorial i will explain you to make breadcrumbs with out plugin.

Featured Image Required Before Publishing A Post

When blogger wants featured image for each and every post in a blog then this simple tutorial is needed.
Every time when we post a content by forgetting a featured image and again we edit and add featured image to the post , it is regular process many bloggers face. In order to reduce this kind of headaches then follow this tutorial.

Saturday 1 February 2014

How To Create Custom Post Types

WordPress has an awesome feature which is known as custom post types which are useful to organize and a different kinds of posts.

How To Create Page Template In WordPress

Page templates are the wonderful feature in WordPress, we can create any kind of templates which are very useful. Most of the themes are built with the help of page templates. In order to create page templates use the following code in the file.

Select A Page As Homepage In Wordpress

In Wordpress you can select a page as homepage. You can select any page as Homepage simply by selecting in settings page.

Friday 31 January 2014

Multi Level Wordpress Menu

WordPress menu are too simple drop down menu, my friend who is running a news portal wanted two row menu where it must contain main category followed with subcategory.
Then i gave this simple snippet to add by replacing the menu with this  snippet.

Enabling Multisite In Wordpress

Multi site is an awesome feature in WordPress, which enables you to create a network of WordPress blogs.
Multi site helps to manage many WordPress installations from one installation.
Advantages of multisite are as follows

Wednesday 22 January 2014

Remove p tag around images In Post Content

In wordpress, when you upload any image in content p tag comes around your image, this may be irritating to users. In order to remove that , we have to add simple snippet in functions.php.

How To Add Colors To Private,Published,Drafts Posts In Admin

In WordPress we always have a boring same color of different posts, in order to specify each type of WordPress post in different colors ,there is a simple snippet which needs to be added in functions.php file. As you can change colors for yourselves.
In $value field add the below css by using php functionality.

Login With Username And Email Address

Have you ever tried of logging WordPress with email id, if not then follow this simple tutorial. Basically in WordPress, we have only option to login with username, when you add this snippet in functions.php we can also login with email address too.

How To Check If Post Has Gallery

In WordPress there is default gallery, i guess most of us don't use because we have awesome plugin called nggallery. But in order to check if a post has gallery or not,we have to add this in wordpress loop.

Display Default Excerpt When There is No Excerpt

While posting in wordpress blog, there may be some posts which do not have excerpts, in order to make excerpt we have add some text every time, but if we want to display a default excerpt for posts which do not have excerpts then add the following snippet in your single.php or any where in your theme(where you want to display)

Monday 20 January 2014

How To Redirect 404 Page To Homepage

Redirection of 404 page to home page is necessary for search engine optimization and it also helps users to get homepage from error pages. In order to redirect error page to home page, a small snippet must be added to 404.php in your theme folder, if you don't find 404page then create 404.php and add the following snippet in it.

Remove Settings Menu In Admin

When we develop a blog to client , client may do some unwanted changes in the back end(settings page), so we need to hide those settings menu in WordPress, in order to disable settings menu there is a simple snippet to add in functions.php which disables settings menu.

Hiding Wordpress Core Update Messages

WordPress updates are too essential for many bloggers but some times it will be pain , some of the word press users does not want to update their previous version of word press to latest version due to compatibility issues. We regularly get these core update messages and unknowingly we will update and loose every thing, in order to hide WordPress core updates here is the simple snippet to add in your functions.php file.

How To Set Featured Image From Attachment

In WordPress theming featured image functionality helps in displaying unique images for posts, every time we have set a featured image , in order to reduce pain for us, i have found a snippet which helps to make attachment(image) as featured image. Add the following snippet in to your functions.php file.

Restrict Admin Panel To Subscribers

In WordPress there are different user levels, like Administrator,Editor, Author, Subscribers. By default WordPress provides access to each and every user level but it is not need to give back end access to Subscriber, in order to restrict Admin panel access simply add the following snippet in to your functions.php file.

Sunday 19 January 2014

How To Disable Plugin Updates

Some of wordpress users love to disable the plugin updates because latest version of the plugin may does not support the mechanism of other plugins, some users disable plugin updates, in order to disable plugin updates there is a simple code to add in functions.php which automatically disable plugin updates.

Remove Screen Options In Admin

Screen options in wordpress backend give extra options which may be not required for you, in order to remove screen options add a simple snippet in your functions.php file, this snippet will remove screen options in your wordpress backend.

Saturday 18 January 2014

Highlight Keywords In Search Results

Dis you know that you can highlight search keywords in your title or excerpt , if you dont then check out this simple snippet which is to be added in your functions.php file.

Redirect To A New Post When Published

In WordPress when you update or add a new post, you will be redirected to posts page where list of posts are displayed, if you want to redirect to new post then i found out a simple way by adding a simple snippet in your functions.php file.

How To Remove Unneeded Thumbnail Sizes

When you upload a image in wordpress there are multiple thumbnail sizes are generated which takes lot of memory of server. In order to get rid of unwanted size of thumnails add the following snippet in your functions.php file.

Remove URL Field in Comments

Now a days lot of spamming is going in the internet activity , in order to reduce spam people use captcha's even after using captcha code, spammers are spamming blogs and websites. Then i found a  way to remove url field in WordPress comments. In order to remove URL field in comments., add the following snippet in your functions.php file.

Automatically Add Custom Field When Post Is Published

There are many plugins , hacks and filters to add custom fields automatically, but i found out a better way to add custom field automatically. In order to do this you have add the snippet in your functions.php file.

Allow Users To Add PHP code in Text Widget

Wordpress text widget is an awesome widget where you can add text , html or javascripts any where but we cannot add php code in it. In order to execute php in text widget use following snippet. Now add the following snippet in functions.php file.

How To Remove Admin Bar In Fornt End

When you logged in WordPress then you might find irritating when you look at the admin header. In order remove or hide admin bar in front end, add the following snippet in functions.php

How To Enable Post Thumbnails

In Wordpress themes, some of the themes don not provide thumbnail support, in order to enable thumbnail support you have to paste the following snippet in to your functions.php file.