WordPress – Check user has specific role

Sometimes you need to check WordPress user role to grant permission to access certain area of a WordPress Website. WordPress doesn’t have a function for checking the user role. Following piece of code lets to you check user has specific role in WordPress.
Read more

How to install phpmyadmin in Ubuntu 14.04 LTS

,

phpMyadmin is a graphical user interface to interact with MySql. Here am explaining how to install phpmyadmin on ubuntu. Before that make sure you have installed LAMP stack on your system. If you haven’t installed LAMP, read this How to Install LAMP on Ubuntu 14.04 LTS.
Read more

Install LAMP on Ubuntu 14.04 LTS

,

LAMP is popular open source web development platform which used to run web servers. Which is a collection of softwares and which includes Linux, Apache, MySql and PHP. Here am explaining how to install LAMP on Ubuntu 14.04 LTS using terminal.
Read more

Tips : Woocommerce product category

Here i am adding few tips that helpful while developing or customizing woocommerce pages.

Get product category id in Woocommerce product archive page
Try the following code to get Woocommerce product category id in product archive page(archive-product.php)
Read more

Add login/logout link to WordPress navigation menu using functions.php

WordPress doesn’t have an option to add login or logout links to navigation menu based on user login status. But you can add login/logout link to WordPress navigation menu using funcitons.php. wp_nav_menu_items filter hook helps you to do it from functions.php.
Read more

Dynamically populate woocommerce product category terms to WordPress navigation menu

Following is a snippet that lets you dynamically populate woocommerce product category terms to WordPress navigation menu. This code only add sub product category to wordpress navigation menu if the woocommerce parent category already exists in wordpress navigation menu.
Read more

How to install Node.js in Elementary OS using Terminal

Follow these steps to install Node.js v6 in Elementary OS using Terminal

Step 1: Open Terminal from applications.
Step 2: Enter following code.

Read more

Fix : WordPress asking FTP credentials to install plugins on localhost – Ubuntu/Mac

WordPress may ask for FTP credentials to install plugins or update theme or plugins on localhost host. Mostly in Linux based operating system, like Linux, Ubuntu.This issue may be arise in Mac OS too. And you need to enter FTP credentials each and every time to proceed with your install/update.

Here is the fix for this issue.

Add the following code in wp-config.php.

Read more