How to Find Id Of A Category, Post, User, or Comments in WordPress

WordPress assign a unique number to each and every item in the site. For example, the User ID is a unique number generated by the WordPress system to help you to identify each user on a website. Sometimes while installing a new theme or arranging multiple items in your WordPress site, you will need to find a user ID , post ID or category ID.  There are different ways to find the ID.

How to find Category Id in wordpress

From your wordpress admin, Go to Posts » Categories 

Method1:

Move the mouse over the Category title (without clicking) and notice the URL that shows up at the bottom left corner of the browser, as shown in the above screenshot. On the link look for the part tag_ID=a, where ‘a’ is the WordPress category ID.


Method2:

Click on the category name. WordPress will open the category editor page. Look at the browser address bar. You will be able to see the category ID in your browser’s address bar.

Method3:

.

Simply move the mouse cursor over the WordPress Category name and right click on it . Select Copy Link Location’ or ‘Copy Link Address’ from the right click menu and paste the URL to a text editor such as notepad


How to find post Id in wordpress

Navigate to the Posts page from the WordPress Dashboard left hand side menu. Once you are there, click on the Post whose ID you are looking. The post will open in post editor, and you will be able to see the post ID in your browser’s address bar like this:

Post Id can also be found using Method1 & Method2 as explained above.


How to find page Id in wordpress

Go to the Pages menu. Use the same methodsas described above to find page Id.

How to find user Id in wordpress

Go to Users » All users and pass the mouse over the user name. WordPress will open the user’s profile and you can get the user ID from browser’s status bar.

You can use other methods described above to find user Id.


How to find Comment Id in wordpress

From wordpress admin, go to the Comments section. Simply pass mouse over Edit link under the desired comment. You will be able to see the comment id in your browser’s status bar like this:

How to Create custom Template for specific category in WordPress

WordPress categories are very convenient way to group related posts together. Your reader can find posts in a specific category in one page and read pots of their interest . Setting up categories provide a proper site structure. You can assign one or more categories while creating the post. See fig below.

In wordpress  each category has its own page. Add category title to your menu. (Refer How to add navigation menu). Your reader can view all the posts on a certain topic in one place.

Before proceeding let us have a look at creating category page in wordpress. Visit Posts » Categories page. On this page you can Add / Edit WordPress categories. Refer the following image to see how to add/find category slug. We are going to use category slug while creating template.

Click on View link to view category page. When a viewer clicks on a Category link  by default, WordPress shows a page with list of Posts in that particular Category. But you can easily create a custom looking page for different categories on your site.

For example:

Suppose you have a category “WordPress hosting” on your site and you want to display all posts under this category in one style. And you have another category “WordPress themes” and display all posts under this category in another style.

Let us see how to create a custom page template for a certain category  in wordpress

As you know WordPress uses a set of template files to display a page. When someone clicks a Category link, wordpress searches down through the template hierarchy in the current theme’s directory to generate the correct page.

So what file is used to load a category page?

WordPress looks for either one of the following templates.

  1. category-slug.php
  2. category-ID.php
  3. category.php
  4. archive.php
  5. index.php

For example:

On your site you have a category “WordPress hosting” with slug “wphosting” and id = “12”. To display this page wordpress look for template category-wphosting.php. If not it’s not found, it will look for template names in the following order. category-12.php >> category.php >> archive.php>> index.php. So to display custom style, you need to create either one of the above template.

Most wordpress theme includes archive.php file( or even category.php file). Edit ‘ archive.php ‘ to make custom look and feel. If you do not want to make too complicated changes, you can use conditional tags inside a generic template, like archive.php. But I don’t want to edit my archive file. Here I’m going to make a category.php and make changes over there.

  1. Go to Appearance » ThemeEditor. From the list of theme files on your right, look for category.php , if you do not have a category.php file, look for archive.php and make a copy of it.(Note: If category.php file exists, go to step 4)
  2. Copy all the contents of archive.php and paste them in your favorite code editor like Notepad. Save this file as category.php. Make necessary changes. Some tips on editing files are given below.
  3. Connect to your website using FTP client. Upload new file(category.php) to /wp-content/themes/your-current-theme/ directory.
  4. (Note:) If category.php file exists, you can either edit code or make a copy of category.php file to create separate design for each category. Here I’m going to make different design for my webhosting category. Make a copy of category.php. Save it as category-{category-slug}.php. In my case save as category-wphosting.php to create separate design for wordpress hosting category. Using this technique you can create templates for any category. Just use category-{category-slug}.php as the file name. You can find category slugs by visiting the categories section as explained in the beginning of this article. Then upload new file as in step 3.

Modify Your New Template

Now you can edit the way you want your category page to look like. If you’re going to attempt this, you need a basic understanding of php code. Here are some tips on editing the template.

Display Category title

Use is_category() conditional tag to display information related to particular category. For example how to add category title or some header image / text related to a category.

Look for <?php if(have_posts()) , add following code above it.

Display post related to a Category

To show  the correct category of posts add following code right above the WordPress loop.

<?php 
$args = array( 'post_type' =>   'post',                        
               'category_name' =>    'wphosting',                    
               'posts_per_page' =>  20, 
               'paged' =>  $paged   );
query_posts( $args );
?>

How to Display WordPress Posts in 4 Columns

Step #1: Create column CSS

First you need to have some CSS column classes in place. Add the following code in your theme’s style.php

/* Create four equal columns that floats next to each other */ .column { float: left; width: 25%; padding: 10px; /* Clear floats after the columns */ .row:after { content: ""; display: table; clear: both; } /* Responsive layout - makes the four columns stack on top of each other instead of next to each other */ @media screen and (max-width: 600px) { .column { width: 100%; } }

Step 2: Edit category.php/category-{category-slug}.php code

Look for following piece of code: Please note: Different themes have different structure and code.  So look carefully and apply same logic.

Replace it with following code.

How to display post in 3 columns

Basically you can adjust column width in above CSS and counter in above php code to display posts in 2,3,4 columns.

See the following part in css code. we set width : 2s% to dispay 4 columns.
.column {
float: left;
width: 25%;
padding: 10px;}

  • Let us see what is happening in php code.
  • First We set the count at 0, created a new row() and then added a column ().
  • After displaying content, we close the column div and increase the counter by one.
  • Now we check whether our counter exceeded maximum number of columns.(Since we want four columns, we check if the counter is 4) .
  • If it reached 4, reset the counter to 0 then close the row div.
  • Repeat the loop.
  • Once loop is done, check whether we close the row div. Check if the counter is greater than 0, then add a</div> tag.

To display content in 3 columns do the following:

  • Edit CSS: >> “width: 25%;” to “width: 33.33%;”
  • Edit php >> “if($i == 4) {” to “if($i == 3) {

And that’s it! Have fun Editing.

How to Add Navigation Menu in WP

How to Add Navigation Menu in WordPress

Since Navigation menu guide your visitors to important sections of your website, it is the most important design element on any page.  

In most wordpress themes, this menu is placed as  a horizontal menu  close to the header. Of course, the menu location can vary depending on your theme and some themes support more than one menu locations.

When you install wordpress, it automatically creates a default Navigation menu. This menu contains a list of your  top-level pages.  It’s generally a bad idea to include a list of  all page titles in menu. Keep your Navigation Short and  List the Most Important Pages First. 

Fortunately wordPress provides a user friendly interface which let you  add and manage any any page  including category and tag archives, posts, pages and custom links. 

  • Step 1:Login to the WordPress Dashboard.
  • Step 2: From the ‘Appearance’ menu on the left-hand side of the Dashboard, select the ‘Menus’ option to bring up the Menu Editor. 
  • Step 3: Create Your Navigation Menu
  • Step 4: Assign Your Menu To The Desired Location
Read More

5 Good Reasons Why WordPress Is Best for Businesses

When we think of building a fully-functional website for our business, which is the first CMS that comes to your mind? Of Course, our answer is going to be a WordPress.

Undoubtedly, WordPress is the world’s most relevant open source content management system that can help you create a professionally-developed website, without any technical assistance. You can easily manage, customize, and extend the functionality of your site in a matter of few minutes by using WordPress’ themes, plugins, and other extensions.

Today, most of the businesses are opting for WordPress web development to grow their business online. Well, there are lots of other reasons that will determine why business should go for WordPress.

In this blog post, we will share some of the interesting reasons why you should opt for WordPress. This will encourage those businesses who are not using WordPress or for those who are new into the web development industry.

  1. WordPress Is Free

The best thing about WordPress is that it is a free open source CMS tool. It means you don’t need to pay for creating any kind of a website on WordPress. In fact, you never have to concern about the hidden charges or any other fees. You can simply download and install WordPress at free of charge.

Plus, it offers tons of free themes and plugins that you can use to build more engaging, more attractive and more professional site within a few clicks of button.

  1. Flexibility or Adaptability

WordPress offers a great flexibility to those who want to set up a dynamic website over WordPress. No matter what type of a website you want – it can be a personal blog, photography or portfolio based website, restaurants or travel website, e-commerce site or anything else.

WordPress has the ability to adjust according to your needs. In fact, it also comes with thousands of compelling themes and plugins that will help you build a custom website with ease. Read More

7 Plugins To Increase Sales Of WooCommerce Stores

WooCommerce is one of the most convenient open source tools available for creating an online store and it is one of the major attractions of getting a website built with WordPress.

A lot of people migrate from other platforms using services which convert from HTML to WordPress or transfer an existing interfaced from other platforms.

Building a virtual marketplace with the free plugin is just the first step an owner needs to take several steps to increase sales of WooCommerce stores and a list of plugins that will be helpful in the objective is being presented here. Read More

7 Best WordPress Classifieds Plugins And Themes for 2018

Some noteworthy websites like Backpage and Craigslist have already taken the world with a storm with millions of open listing and monthly visitors.

The only drawback that’s holding them back has to be their design. The websites have been designed in early 1990s and have not been updated since then.

Unless you have upgraded your site with the Best WordPress Classifieds Plugins and themes, it will not help you get the right amount of visitors you want.

So, heading towards the top 7 classified plugins and themes for WordPress in 2018 is what you should be aiming for. Yes, with so many options, making the right decision can be pretty tough, but it isn’t impossible.

So, buckle up and head through the top 7 names in the market lately.
Read More

Best WordPress bookstore themes for your e-book store

Writing an e-book? Want to sell it online on your own bookstore website?

All you need is one of the best WordPress bookstore themes. The best features of WordPress are its openness and customization.

Many developers are trying their hard to make this platform better for authors and readers. When it comes to WordPress plug-ins, the theme plug-ins cannot be avoided.

Nowadays many amazing themes are available for the bookstore websites. To sell your e-book with ease you need to make it attractive so that the readers will show their interest to purchase the e-book.

Some themes are discussed below, which may help you to make your bookstore website an attractive one.

Read More

Avoid email sent from your WordPress site ending up in the user’s spam folder.

Did you know that sometimes monthly newsletters or weekly special offers  from your WordPress site are going to your recipients’junk folders? This is a common problem with emails that are sent from a website via PHP.  Different mailbox providers adopt different techniques to decide when an email is or is not spam.

Why does that happen? How can you stop this from happening?  In this tutorial, we’ll show you how to fix this email issue. Read More

How to Add Custom Menus locations in WordPress Themes

WordPress includes an easy to use mechanism to create your own menus and menu structure. From your wordpress admin panel click on  Appearance >>Menu.

Here you can see existing menus and menu display locations. You can create as many menus as you want. But displaying this menu varies  from theme to theme. This tutorial describes how to add additional menu locations to an existing WordPress theme.  Read More

WordPress functions.php File

Functions.php is a file found in your Theme’s folder. To understand the file location, look at the following wordpress theme hierarchy.

Adding Code to the Functions File

The functions file is where you put various features and functionality within your wordpress theme. You can achieve this by defining your own functions or by calling built-in WordPress functions. For example, you can control :

  • Use of featured images
  • The image sizes supported by your theme
  • Widgetized areas
  • Decide whether to show post from a particular category in home page or not
  • And  more ….

You can produce the same results by using a WordPress Plugin. In other words the functions file behaves like a WordPress Plugin. But using lots of plugins can slow down your blog’s performance.

When You Shouldn’t Use functions.php

Functions.php is a theme-specific file, which means each theme has its own functions file and any code/function added there strictly related to that particular theme. As soon as you update theme or change your theme, your changes will be wiped out.  See how to use a child theme to add code without worrying about losing your changes.

How To Create A Child Theme in WordPress

A WordPress Theme is a collection of files that produce the graphical interface for a wordpress website. You can find plenty of free or premium themes on internet. A good premium theme providers will aggressively

  • Update their themes with new features and functionality
  • Add more security features or bug Fixes
  • Update any browser compatibility issue
  • Keep up with the latest WordPress enhancements.

Whenever a new version of your WordPress theme is released, WordPress dashboard will notify you to update your theme to the latest version. WordPress experts always recommend you to update yo themes to your theme to latest version.

But when you update your theme, you’ll lose all the tweaks you made to it. How can you update a WordPress Theme without losing customization? WordPress is providing an easy mechanism to solve this issue. It is parent theme child themes combination.

What is a Parent Theme?
A parent theme is a complete theme which includes all of the required WordPress template files. Any theme in your /wp-content/themes/ folder is considered as parent theme.
What is a Child Theme?
A child theme is simply a theme that inherits the functionality and looks of another theme – the parent. Read More

How To Configure Akismet For WordPress Blog

Spam is a huge problem for every website. Spammers love WordPress sites. Spam comments are irritating, and your readers might lose faith in you. Spam comments can negatively impact your search engine rankings. Akismet is one of the best comment spam filtering service that blocks spam in comments automatically. It is free to use and is highly recommended.

In this post, I will share how to configure Akismet For wordPress blog.


  1. Activate Akismet Plugin

    Akismet comes pre-installed with wordpress installation. You need to activate it. Go to Plugins > Installed Plugins. Click on Activate link next to Akismet Plugin


  2. Enter API key

    After activating Akismet, it will require an API key. If you already have a key enter and proceed. If you do not have a key, you can get it for FREE. Click on “Get your key”, you will be directed to Akismet’s website. Read More

5 Best WordPress Product Catalog Plugins

WordPress is a popular content management system that is known for its ability to be a customizable multipurpose platform. WordPress provides a user-friendly dashboard, free library of themes and plugins that is available for all users that have installed this content management system.

Most e-commerce based online stores are using WordPress. When it comes creating an online catalog, WordPress has made it easy for every business to turn their website into an online catalog. Read below and discover the 5 top rated WordPress catalog plugins.

5 Top Rated WordPress Catalog Plugins

1- Product Catalog

The first top rated WordPress plugin is the Product Catalog by Etoile Web Design. This plugin is mainly popular for its minimalistic themed product catalog design and its SEO options. In terms of style, minimal web design is the hottest themed trend in web design today. Read More

Best Wordpress Store Themes

14 Best WordPress Store Themes

Starting your own online store is your gateway to making money online. Depending on what you are offering, whether a product or a service, your eCommerce business, the process should not only cheap but also easy to setup and use.

Thanks to WordPress, this is possible. WordPress is the easiest way you can get started selling products and services online. You don’t have to be a genius to setup an online shop, all you need is WordPress, some eCommerce plugins. To make it look more of an eCommerce store than a blog, here are some themes to get you started.


FlatStop
Price: $49
FlatStop is a modern, responsive, parallax-powered WordPress theme designed for eCommerce websites. This theme is optimized to work with WooCommerce plugin. Read More

Top 15 WordPress Photography Themes

WordPress is not just great for writing, but also for images. More than 19% of the world’s websites are powered by WordPress, so its no surprise that somewhere out there, there are some WordPress sites for the creative people.

What is great about WordPress is that it is open source. You can mold the site to your liking. Add some great looking themes, and people wouldn’t notice that you are using WordPress.

Deep Focus: $69

Deep Focus
Deep Focus

Deep Focus is a stylish photography theme from Elegant Themes. You can turn your WordPress blog into a fully functional online photo gallery while still maintain the core features of a blog. The theme comes with a blog and CMS-style homepage; thus making it a great solution for photographers, building online presence.
Read More

8 Best Job Board WordPress Themes

Job boards online is becoming popular day by day. Many employers are now looking into remote workers to do tasks in a faster and efficient manner without the needs to long term contracts, plus the benefits of cheaper wages compared to a local employee.

What is a job board?
A job board is basically a virtual area where there are lists of available jobs. People looking for work can check the board to see the list of available works. The job board contains a job listing on the internet. This is similar to classified ads for jobs.

Why WordPress for Job Boards?
WordPress is an open source Content Management System that can do just about anything. With WordPress plugins, you can turn an ordinary website to a job board in no time. Plugins like WordPress Job Board, along with the WP Job Manager lets you build a job board from scratch by just downloading these free plugins.

Now that you know how awesome a WordPress Job board is, here are some themes that can make a good WordPress Job Board site:

Jobify: $55

Read More

Speed Comparison of Popular ThemeForest WP Themes

ThemeForest is the most favorite and most sought out place for premium wordpress themes.  Most of the themes are created by professional web designers and have high quality design and latest features.

Let us do a speed comparison of  best selling ThemeForest WordPress Themes. What follows is a list of most popular ThemeForest wp themes, sorted by Rank.

We have used 3 tools for this comparison:

A Comparison matrix should help you get an idea of speed performance of these  themes. You can sort the table by any column. Just click on header column to sort the table by that column. Read More

17+ Best Premium WordPress Theme Providers

A search on Google Trends for “WordPress” shows “WordPress Themes” topping the list

There are so many themes and theme providers for WordPress out there that if you have just started using the platform you’ll get lost in confusion. So we’ve decided to compile the best place to get WordPress themes and who are the theme providers.

Another reason we have to do this is that themes WordPress themes nowadays are crafted to fit to almost any screen size or device. If are a beginner, or you haven’t changed your theme for years, then it’s time to upgrade it to a more responsive WordPress theme.

Also, using search engines to look for WordPress themes, is not the best solution. That is why these premium theme providers come into play.

Why use Premium Themes?
With free themes, you can download, and install it to any site you want without limitations. However, free themes have a catch. First is the level of customization. Free themes doesn’t have those template builders or WYSIWYG editors found mostly in premium themes.

Another reason to choose premium themes is that they have a cleaner code with better features. They also come with proper support and documentation to help you just in case something doesn’t work. Free themes don’t have these.

If you are serious about your website and want it to stand out, be unique, and be a cut among the rest, particularly in web design, WordPress premium themes are for you.

So, without further adieu, here we have a collection of the world’s best Premium WordPress theme providers:
Read More

Top 10 Stunning Real Estate WordPress themes for a dazzling real estate website

Want to make a big impact for your real estate website?  Here are 10 superb wordpress real estate themes that are sure to help.

.


  1. Curb- appeal evolved

1-curb-appeal-evolved

Agent Revolution never disappoint whenever they release a word press theme, and curbappeal evolved is no exception. This is an improvement from a previous theme –curb appeal legacy. The home page offers all website visitors the option to search property listings either by price or the property type. It’s also possible to search homes by map.

Features:

  • Responsive.
  • Easy translation to other languages.
  • Ability to automatically update the theme without losing CSS customizations.
  • Relies on the Genesis framework

View it here and if you like it, why not download it here?


  1. Homeland

2-homeland_theme2

This theme offers you two layouts; you can either choose the full width or the boxed style. For real estate firms that are active members in a multiple listing service, homeland theme can be leveraged by dsIdxpress plug-in to embed live real estate listings. It is also retina ready. This means that high resolution images can be loaded without lowering the performance of your website. How cool is that? This feature works on devices that have the retina display feature.

Other features:

  • Ability to customize page templates and post types.
  • 20 Google web fonts.
  • Comments are threaded up to the third level.
  • Unique header background image per page.
  • SEO ready.
  • Ability to self host videos.

Read More