How to Easily Customize CSS in WordPress

Are you looking for a way to customize your default theme’s CSS in your WordPress site? In this article I’ll show you three ways to Easily Customize CSS in WordPress site.

You can add custom CSS in WordPress mainly in three ways.

  • By WordPress Themes Customizer
  • By Using CSS Custoizer Plugin
  • By Child Theme

Method 1: Add CSS by Themes Customizer

The most easiest way to add custom CSS is using the themes customizer to customize CSS on WordPress. You don’t need additional plugin  to perform this. Just go to your WordPress Dashboard and click on Customize from Appearance.


Customize CSS using theme customizer


Now, from the new page click one Additional CSS from the left panel of the dashboard.


Customize CSS using theme customizer


Input the CSS code here and publish.


Customize CSS using theme customizer


Thus you can add custom CSS on your site. The most important part of using theme customizer is that, you can see the changes live.

Method 2: Add Custom CSS using a Plugin

If you don’t want to customize your theme then there is an alternative to add custom CSS. You can use a plugin to add custom CSS in your site. There are several plugin’s to do that. Some of the renowned plugin is listed below.

  • Simple Custom CSS
  • WP Add Custom CSS
  • Simple Custom CSS and JS
  • My Custom CSS
  • Custom CSS Pro

In this article I’ve used Simple Custom CSS to add customize CSS on my site. Let’s see how we can do this.

Install The Plugin

Here before I’ve mentioned couple of plugins. Use one of them to add custom CSS on your site. I’ll show you how to install and use Simple Custom CSS on WordPress.

First of all, Go to your WordPress Plugin directory from Dashboard and then install the plugin. To get installation help you may read about How to Manage a WordPress Plugin.


Install Simple Custom CSS to customize css


Activate the newly installed Plugin.

Add Custom CSS

After activation navigate to Dashboard->Appearance->Custom CSS and from here you can add your CSS code.


Add Custom CSS


Click on Update Cusom CSS button and see the changes.

Method 3: Add Custom CSS by Child Theme

If you need several lines of CSS say 1000 lines, you better use a child theme. Besides, if you want more secure way that will not effect your live site, use a child theme.

Use One-Click Child Theme to create a child theme in a single click. Install the plugin and activate it.

Now go to Dashboard->Appearance->Child Theme and create a child theme.


Create a Child Theme


Now, Navigate to child theme editor to add Custom CSS code. For this, head over to Dashboard->Appearance->Editor


Switch to Child Theme Editor


So those are the ways to add Customize CSS in WordPress easily. I hope this piece of article will help you to customize your site dynamically. If you have problem or idea beyond this article, leave a comment below.

How to Fix the 500 Internal Server Error on WordPress Website

If you are surfing the web for a long time, you must see the ‘500 Internal Server Error’ on any site. It’s one of the most scariest problem for beginner in WordPress. But following some steps this error can be fixed easily. In this article I’m going to show you how to fix the 5oo Internal Server Error on your WordPresss site.

Why causes 500 Internal Server Error

There are many reason behind that can create 500 Internal Server Error on any WordPress site. Some of the problems are listed blow.

  • Insufficient PHP memory
  • Corrupted .htaccess file
  • PHP timeout
  • Permission error and
  • Conflict between Plugins

In some steps I’m going to show you how to fix this error. But before you start please take a backup of your site. You can see How to Clone WordPress to backup your site in single click.

Clean your Browser Cache and Cookies

First of all clear your browser cache and delete the cookies. Though 500 Internal Server Error doesn’t usually causes for browser caches and cookies but sometimes in a rare case it may happen.

Deactivate all Plugins

Now deactivate all your plugins from your WordPress Dashboard. You can deactivate all your WordPress plugin by bulk option. See how to manage a WordPress Plugin that may help you.


Bulk Deactivate Plugin


After deactivating all plugin hard refresh[Ctrl+F5] your site and if it loads properly then the error is within one of your plugin. Activate plugins one by one and detect the plugin causing the error. Then contact at the plugin support for the issue.

If this doesn’t solve your 500 Internal Server Error then follow the next step.

Increase the PHP memory limit

This problem mainly occur when you are using a shared hosting service for your site. In shared hosting service provider set a lower PHP memory limit. When your WordPress site exceeds the limits you face the internal server error. You can fix this adding a line into your wp-config.php file.

Simply go to your WordPress root directory and download the wp-config.php file. Add the lines below to that file and override the file with the existing one.

define('WP_MEMORY_LIMIT', '64M');

Now refresh your browser. If page loaded successfully then you were facing error with lower php memory. But, if this doesn’t work then remove the code from wp-config.php file.

Check File Permission

Check your file permission weather it is ok or not. Go to Cpanel and open your sites root directory with FTP client. And see the file permission weather is it 755 or 644. Any other value can cause the server error issue.


Rename htaccess file


Also you can rename your .htaccess file and refresh your browser. If it reload your site properly then you have done it. Save the settings form WordPress settings->Permalinks.

Upload the Core WordPress file

If above solution does’t work then re upload and override wp-admin and wp-includes folder to your core WordPress directory. This may help if there is problem lies files in those folder.

Contact Hosting Provider

If none of the above solution works for you then you need help from expert. Contact with your Hosting Provider in that case.

So these are the nearest possible ways to fix your 500 Internal Server Error on WordPress site. I hope you like this article. You may also like to read Fix Error Establishing a Database Connection in WordPress and  Fix WordPress Sesion Cookie Error. Like us on Facebook and follow on Twitter to get the latest updates.

How to Add WordPress Pagination Without Plugin

Yesterday one of our client ask to add a pagination feature in Woo Product Table Pro plugin. Today we’ve added the feature in our plugin. After that, I thought to write a step by step article for beginner in WordPress on how to add WordPress Pagination without plugin. So here it is.

Add the following lines into your functions.php file in your themes. This will add a numeric pagination to your page & post.

function ca_pagination() {
    if( is_singular() )
    global $wp_query;
    $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
    $max   = intval( $wp_query->max_num_pages );
    /** Add current page to the array */
    if ( $paged >= 1 )
        $links[] = $paged;
    /** Add the pages around the current page to the array */
    if ( $paged >= 5 ) {
        $links[] = $paged - 1;
        $links[] = $paged - 2;
    echo '<div class="navigation"><ul>' . "\n";
    /** Previous Post Link */
    if ( get_previous_posts_link() )
        printf( '<li>%s</li>' . "\n", get_previous_posts_link() );
    /** Link to first page */
    if ( ! in_array( 1, $links ) ) {
        $class = 1 == $paged ? ' class="active"' : '';
        printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' );
    /** Link to current page*/
    sort( $links );
    foreach ( (array) $links as $link ) {
        $class = $paged == $link ? ' class="active"' : '';
    /** Link to last page,*/
    if ( ! in_array( $max, $links ) ) {
        if ( ! in_array( $max - 1, $links ) )
            echo '<li>…</li>' . "\n";
        $class = $paged == $max ? ' class="active"' : '';
    /** Next Post Link */
    if ( get_next_posts_link() )
        printf( '<li>%s</li>' . "\n", get_next_posts_link() );
    echo '</ul></div>' . "\n";


Use a CSS to to style it dynamically. Paste the following code into your css file.


.navigation li a,
.navigation li a:hover,
.navigation a,
.navigation li.disabled {
    color: #fff;
.navigation li {
    display: inline;
.navigation li a,
.navigation li a:hover,
.navigation a,
.navigation li.disabled {
    background-color: #6FB7E9;
    border-radius: 3px;
    cursor: pointer;
    padding: 12px;
    padding: 0.75rem;
.navigation li a:hover,
.navigation a {
    background-color: #3C8DC5;


If you want to add this pagination into your archive pages or any other just add the following code there.

<?ca_pagination()); ?>


I hope this will help you adding WordPress Pagination Without Plugin to your WordPress themes. If you like this post you may also like how to add Metabox on WordPress.

How to Fix the Error Establishing a Database Connection in WordPress

If you are using Web for long time then you might have seen the the Error Establishing a Database Connection in WordPress. Sometimes for a beginner it seems scary a little. In this guide I’ll show you how to fix the ‘error establishing database connection’ error.

Why cause Error Establishing Database Connection?

There are many reason behind this error. First of all, lets see why this error occurs.

  • Wrong Database Login Credentials
  • Corrupted Database
  • Corrupted WordPress files
  • Overloaded Database Server

How to solve Database Connection Error in WordPress?

There are some unique methods by which you can fix your database connection error on WordPress. Follow the steps below.

Step 1: Repair your WordPress

First of all, try to repair your WordPress. To repair your WordPress download the wp-config.php file from WordPress root directory and add the line below.


define('WP_ALLOW_REPAIR', true);

After adding the lines replace the file with newly edited file from your site. Next, go to the link

You will be redirected to a page like-


Repair Database

Select anyone from the option to repair your Database. Hope this may work if you have a error with database. If the error still alive follow step 2.

Step 2: Check your WordPress credentials file

Now check if your wpconfig.php file is well configured. Simply this one is the most important file to connect your site to Database. Check the settings that if it is corrupted.

/** The name of the database for WordPress */
define('DB_NAME', 'database_name');

/** MySQL database username */
define('DB_USER', 'database_username');

/** MySQL database password */
define('DB_PASSWORD', 'database_password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Remember: Here DB_HOST name varies with your Host Provider.

If everything is ok in this file then be sure that your database credentials is free from causing this error.

Step 3: Check your MySQL Server

If step three doesn’t work for you maybe there is a error with MySQL Server. Your database may be busy or overloaded that can’t take loaded properly. This occurs mainly when you are in shared hosting or too much traffic. For this try to use a dedicated hosting.

Sometimes this problem if you have a permission issue with your database. To check whether you have the necessary permission connect your Database through PhpMyAdmin.

Create a file named test.php in WordPress root directory and open the file through text editor. Add the lines below in your newly created php file.

$link = mysqli_connect('localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysqli_error());
echo 'Connected successfully';

Make sure you have replaced username and password with your ones. Save settings and go to the URL If you get a message “Connected successfully” then your login details are correct.

But if get a message saying  “Could not connect: Access denied for user ‘username’@’localhost’ (using password: password)” then the problem lies in here.

Create a new username and password and update the file in WordPress to get rid of this issue.

So, this is all for today. I hope this article will help you fixing the Error Establishing a Database Connection in WordPress. There similar articles on WordPress issue. You can read Fix WordPress Session Cookie Error, Fix White Screen Of Death in WordPress and Common Errors in WordPress and How to Fix Them.


WordPress Meta Box for Beginner

Do you want to customize your WordPress theme/plugin to add additional information on your post/page? Then you need to use Meta Box on your WordPress. In this step by step article I’ll show you how to add Meta Box in WordPress for beginner.

What is Meta Box?

Meta Boxes are one of the most important feature of WordPress that allow you to add custom option to your WordPress page of post. In WordPress you can use category and tag which is given as default. But if you want to add more info about your product/page/post, then what do you need first?

In this case you can add custom meta box to show extra data to Page/Post or Post Type.

What is Meta Data?

The data we input in meta box is called meta data. More simply the value we input in meta box is a meta data. It can be number or text.

But, remember, we need to sanitize the date to make it secure.

How to add Meta Box in WordPress?

You need to register a function named add_meta_box to create a Meta Box in WordPress. This function includes the following syntax:

add_meta_box( $id, $title, $callback, $screen, $context, $priority, $callback_args)

Now we will create  a meta box for post type. I’m creating this file into themes functions.php file.

Just write the code into your themes functions.php file. But creating a unique php file for meta boxes will be better for practical use.



 	function my_meta(){
    "My first meta box",
function my_meta_box_mes(){
  echo '<input type="text" |';


See how does it look


Custom Metabox

Saving Meta Data

You can also save your meta data adding a function. You can use a code like below

add_action("admin_init", "custom_metabox");

 	function custom_metabox(){
    "Custom Metabox",
function custom_metabox_field(){
  global $post;
  $data = get_post_custom($post->ID);
  $val = isset($data['customm_input']) ? esc_attr($data['custom_input'] [0]) : 'no value';
  echo '<input type="text" name="custom_input" id="custom_input" value="" .$val. />';

function save_detail(){
  global $post;

You may need to show meta data in your single post. For this, edit your single.php file in your theme file.

Add the code below to show your Meta date in single post.


$custom_post_type = get_post_meta($post->ID, 'custom_input', true);
      echo $custom_post_type;

Here custom_input is my custom meta data id. Use your own ID to show your custom meta data.

So this is all for today. I hope you have understand adding and customizing WordPress Meta Box for Beginner. There are some other tutorials on basic php in Bengali language with you tube tutorial. You can check PHP Bangla Tutorial.

How to Fix – Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.

If you are using WordPress for a long time then you might face the problem login to PhpMyadmin. It keeps saying “Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.” In this article I’m going to show you how to fix Session Cookie error on WordPress.

You can fix this easily. Just follow the steps below.

Step 1: Configure your file

First of all check out that is your server files is properly configured. If not make the changes like below.

$cfg['Servers'][$i]['auth_type'] = 'cookie';

Step 2: Clear the Cookies from your browser

Now go to your browser settings and clear the cookies from it. Navigate to inspect elements on your browser. If you are using chrome click Ctrl+Shift+I.




Then go to application tab and clear the cookies and caches from browser and click the Clear site Data button. See the screenshot below. I have used it for my Chrome.


Clear cookies from browser


After clear cookies you can also clear your browser history.

Now try to login your PhpMyadmin. Hope this will work for your Failed to set session cookie error. If you like this article you may also like Fix White Screen Of Death on WordPress and Fixing the Common Errors in WordPress


PHP Basic Bangla Tutorial – পিএইচপি বেসিক বাংলা টিউটোরিয়াল

How to Import and Export Gutenberg Blocks

Do you know that the new blocks from Gutenberg is reusable? Yes, you can reuse the blocks in the updated version of WordPress. Today I’m going to show you how to reuse the Gutenberg blocks.

So, from the last WordPress update you can see that Gutenberg block editor is set as default editor. With the changes of time this block editor has added some advanced feature. Now you can use your blocks later on your site or another site.

What is reusable Gutenberg Blocks?

You can Import and Export your Gutenberg Blocks easily. This reusable Gutenberg blocks lessen the time to reuse a special section of your site frequently. The Gutenberg blocks can be used for a call-to-action in any place of your blog post, testimonial, widget area, feedback, header, footer etc.

Now lets see how to import and export Gutenberg blocks.

Step 1: Save your blocks to use later

If you want to use a block later on WordPress, then save the blocks giving a unique name. For this, when working on a blocks click on the three dot icon above your block (see the screenshot below).

There will be a window from which click on Add to Reusable Blocks.


Add to reusable blocks


Now, input the block name in text field and save the changes.


Save as reusable blocks


So, your block is now saved as reusable which you can use as a template later.

Step 2: Export your Gutenberg block

To export a block click on the (+) sign of your blocks left to your page. From there click on Reusable.


Export reusable blocks


Now, a window will appear, from where you can search blocks or click on Manage All Reusable Blocks button.


Manage all reusable blocks


You can see all the blocks you have saved before. Click on the block which one you want to Export.


Export blocks as JSON file


Hovering mouse on the blocks you can see the Edit, Trash and Export as JSON option. Click on Export as JSON to export the blocks. From your downloaded folder see the JSON file.

Step 3: Import Your Gutenberg Blocks

To Import blocks from your HDD navigate to block section (see the first two images of Step 2). Then click on Import from JSON button. A small window will appear from where click on Choose File Button.


Import from JSON


Now, choose the file from your HDD location.


Choose the JSON file to Import Block


Finally, click on Import Button to import your block file.

Click on Import Button


And finally you have successfully imported block to your site.

Using this technique you can Import and Export Gutenberg Blocks to another site or reuse the blocks later on your same site. You can also see my previous article on Disabling Gutenberg Editor and Replace Gutenberg Editor with Classic Editor.



WooCommerce Min Max Quantity & Step Control

Are you fed up with the default WooCommerce Cart Quantity? May be you want to override the WooCommerce minimum quantity or maximum quantity. Also you may need to control the step of product increment. Then read this article ‘WooCommerce Min Max Quantity & Step Control’ to control WooCommerce Cart quantity and step.

There are two methods to control the WooCommerce order quantity and step. Customize your WooCommerce plugin on your site or using a plugin. In this article I’ll tell you the second methods. If you are a beginner lets go ahead.

Actually there is scarcity of plugin to override the default cart quantity and the step of products in cart. Here in this article I’ve used WooCommerce Min Max Quantity & Step Control plugin.

Step 1: Purchase and Install the plugin

From CodeCanyon purchase the plugin (link is given above). You can see the installation process in the documentation. Then activate the plugin.

Step 2: Configure the plugin for All Products(Global)

You can set a value, that will work for all products, unless you choose an individual value for specific product. This is global value in WooCommerce Min Max Quantity & Step Control plugin. To set this value navigate to Dashhboard->WooCommerce->Min Max Step Quantity.


WooCommerce Min Max Quantity & Step Control Global configure


After setting necessary configuration submit the changes by submit button.

Step 3: Configure the plugin for Single Product

You can set a different min/max order quantity and quantity step for one or more specific value for your products. To set a different value for any product, go to the product page.

For instance, if you want to change the value for a product named Belt, go to the product page. You can navigate also Dashboard->Products->All Products->Belt->Edit

Now, from the Product Data section click on Min Max & Step.


WooCommerce Min Max Quantity & Step Control Single Configure

Finally, from the Min Quantity, Max Quantity and Quantity Step select the value you want.

You are done. Now publish/update the product.

Customize Messages: Also you can customize the pop-up Cart messages from plugins configure page. Navigate to Dashhboard->WooCommerce->Min Max Step Quantity.


WooCommerce Min Max Quantity & Step Control Message Configure



Related Article: You can try the free version of this plugin from WordPress Plugins archives.

For Global products: WooCommerce Min Max Quantity & Step Control Global

For Single Products: WooCommerce Min Max Quantity & Step Control Single

This is all for today. I hope this will help you to customize your WooCommerce Min Max Quantity & Step Control easily. If you face any problem, leave a comment below.


WooCommerce Min Max Quantity & Step for Single Products

Are you looking for a easier way to control WooCommerce Min Max Quantity & Step for Single Products? Yes, I’m going to tell you about how to control WooCommerce Cart quantity for single products.


Why WooCommerce Min Max Quantity & Step Control Single?

In your WooCommerce store there may some products that customer needs to purchase in bigger quantity. For instance, if you have a Wholesale store customer may purchase 50 pieces of shirt. Then how he increase the number of cart quantity to 50?

Yes, we all know in WooCommerce we increase the quantity in cart one by one. That’s take much time. But you can control the step in cart using WooCommerce Min Max Quantity & Step Control Single plugin. It’s totally free in WordPress plugin archives.

Also you can set the minimum purchase quantity and maximum purchase quantity with this free plugin. If you want to control WooCommerce Min Max Quantity & Step for global products read this article.

Step 1: Install and Activate the plugin

First of all, install WooCommerce Min Max Quantity & Step Control Single. For this, go to WordPress Dashboard of your site. Then navigate to Dashboard->Plugins->Add New and type the plgugin name in the search field. From couple of plugins install the right one.

WooCommerce Min Max Quantity & Step Control Single installation


After installation activate the newly installed plugin.

Note: You can also read how to install and manage a WordPress plugin.

Step 2: Configure the plugin

Now, go the the single product page which you want to configure. You can navigate to Dashboard->Products->All Products and edit the products you want.

From Product Data click on Min Max & Step and configure the cart quantity.


WooCommerce Min Max Quantity & Step Control Single Configure


Min Quantity: From Min Quantity input box give the Minimum number of products customer can purchase for this product.

Max Quantity: From Max Quantity input box give the Maximum number of products customer can purchase for this product

Quantity Step: In Quantity step input field input the increment and decrements step for this single product.

Step 3: Publish the page

After configuration publish the products and view the product. See how does it works below gif file.


WooCommerce Min Max Quantity & Step


Configure Messages

You can also change the notification messages when customer add products to cart. Just navigate to Dashboard->Products->Min Max Step Quantity

WooCommerce Min Max Quantity & Step


So, this is all for today. I hope you have understand how to control WooCommerce Min Max Quantity & Step for single products. If you face any problem leave a comment below.

How to Control WooCommerce Min Max Quantity & Step for Global Products

Do you want to change the default WooCommerce Min Max Quantity & Step for all your products? Then read through this exclusive article. I’ll show you how to change the default value by WooCommerce Min Max Quantity & Step Control Global, a totally free WordPress plugin.

Why WooCommerce Min Max Quantity & Step Control Global?

If you are familiar with WooCommerce, then you noticed that the increment and decrements value of WooCommerce products are one. So when you own a store that are selling multiple items at time, customer has to increment the steps one by one. Suppose you want to order a book of 100 copies. Than you need to click the increment button 100 times.

WooCommerce Min Max Quantity & Step Control Global plugin help you this doing this easily. You can set your increment step 10 and then you can choose 100 books in 10 clicks.

Also you can set a Min & Max number of products to be added to cart at a time.

Remember here: This plugin works for only global products (all products in you store). If you want to customize the min max step and step control for single/variable/grouped products then read WooCommerce Min Max Quantity & Step Control Single product.

Install & Activate the plugin

First of all, head over to plugins directory from your sites Dashboard. You can navigate to Dashboard->Plugins->Add New. In the searchbox type WooCommerce Min Max Quantity & Step Control Global and install the plugin.

WooCommerce Min Max Quantity & Step Control Global Installation


After successful installation activate the newly installed plugin.

Related Plugin: How to install a WordPress Plugin.

Configure the plugin:

Navigate to Dashboard->WooCommerce->Min Max Step Quantity Global and configure the plugin.

SETTINGS (UNIVERSAL): Min Quantity, Maximum Quantity and Quantity Step from SETTINGS (UNIVERSAL). Select the value as much as you want.


WooCommerce Min Max Quantity & Step Control Global configure


MESSAGES: There are some messages when customer add products to cart. You can customize all those messages. You can customize messages for

  • Minimum Quantity Validation Message
  • Maximum Quantity Validation Message
  • Already in cart message
  • Minimum Quantity message for shop page

Note: Don’t change [% ] from message section input field as it works as a variable.

That’s all for now. I hope WooCommerce Min Max Quantity & Step Control Global plugin will help you to customize default min max & step value of WooCommerce.



How to Add Social Media Icons To WordPress

Do you want to increase visitors on your WordPress site? There are many ways to do that. One of them is to add a social media icons to WordPress site. It’s easiest and most important way to increase visitor on your site.

In this article I’ve used Social Media Share Buttons & Social Sharing Icons to create the social media icons. Let’s see how does it work.

Step 1: Install and activate the plugin

First of all, install Social Media Share Buttons & Social Sharing Icons from WordPress plugins archive. You may go through how to Install a WordPress plugin.


Social Media Share Buttons & Social Sharing Icons

Social Media Share Buttons & Social Sharing Icons


Step 2: Configure the plugin

Please configure the plugin following the sub-steps below.

Select the the social media

After activating the plugin, head over to Dashboard of your site. Then, from the left panel click on Ultimate Social Media Icons.


choose which icons to share

Choose which icons to share


Then, there will be several settings to configure. Click on the first item saying ‘Which icons do you want to show on your site?’. From there choose the social media icons that you want to show in your site.


Choose icons


Select the action

Now click on second question from the same page as shown in the picture below. There will be several checkbox from which choose the action you want. For instance, tick the third checkbox from Facebook option if you want to share your your blog with Facebook Friends.


share with facebook

Share with facebook


Choose the Position

Then from the third option choose your desired position. There are many ways to choose position. You can show the share icon through widget area, define the location on the page, place it via shortcode or show icons after post. Choose your best one.


Choose the position

Choose the position


Here I’ve marked widget, so I need to select to widget area.

Choose sidebar area to show icon

Choose sidebar area to show icon

Choose widget area to show icon

Choose widget area to show icon

Step 3: Publish the post

At last, publish the post. You are done. See how does it look in the left sidebar.

You may like to read how to Add Click To Tweet Button on WordPress and The top 9 Social Media Plugins of WordPress.

I hope you have got how to add Social Media Icons to WordPress site. If you have any question, let me know that in comment section.