List/Grid

Tag Archives: wordpress hacks

Remove WordPress Admin Bar Showing On Website

Remove WordPress Admin Bar Showing On Website

The new wordpress admin bar is a cool feature introduced in the newer wordpress versions. However for some reasons you don’t like it ant want to get rid of it,… Read more »

How To Get Most Commented posts In WordPress

How To Get Most Commented posts In WordPress

In this post i will show how to display most commented posts (most popular) in WordPress. To display n number of popular posts, this is you should do: $popular =… Read more »

How to list all posts in WordPress

To show all published posts in your WordPress blog, you first need to create a template with the following code: After you save this template in your themes folder, go… Read more »

How to create and use wordpress page templates

Page templates allow you to creates custom pages, eg: creating a page to display infos about the author or any random php code that you wish or anything else. A… Read more »

Using Custom Fields for post thumbnail – WordPress

There are couple of ways you can show thumbnail of a post in your WordPress blog. First thing you need to do is create a custom field under add post… Read more »

See post from any category – WordPress

Here is how to show posts from any particular category in WordPress:

Get post author name – WordPress

While working with wordpress, you might want to do something with the post author. Here is how to get the author name: $postAuthor = $post->post_author; //$postAuthor have the Author Id… Read more »

WordPress – Show Related posts based on tags and category

Instead of using any plugin to show related posts based on the category, you can use this small piece of code to show post related to the category of the… Read more »

WordPress – Get category name in sidebar

I wanted to add some code in the sidebar depending on the category name of the post and also display the category name. $categories = get_the_category($post->ID); if ($categories) { $category_ids… Read more »

WordPress – Show posts tricks

While creating a blog using wordpress, you might require this quick tips that are very important and used quite often. Grab Category name < ?php $category = get_the_category(); echo $category[0]->cat_name;… Read more »