Sunday, August 9, 2020

How to add custom role in paid memberhsip pro specific level

1) have to install
2) add that code 
	This code assumes you already have custom roles created
	for bronzemember, silvermember, and goldmember.
	Members signing up for membership level #1 get "Bronze Member" role.
	Members signing up for membership level #2 get "Silver Member" role.
	Members signing up for membership level #3 get "Gold Member" role.
	Members cancelling are given the subscriber role.
	Admin users are ignored.
function my_pmpro_after_change_membership_level($level_id, $user_id)
	//get user object
	$wp_user_object = new WP_User($user_id);
	//ignore admins
	if(in_array("administrator", $wp_user_object->roles))

	if($level_id == 2)
		//New member of level #2. Give them Silver Member role.
	elseif($level_id == 0)
		//Cancelling. Give them Subscriber role.
add_action("pmpro_after_change_membership_level", "my_pmpro_after_change_membership_level", 10, 2);

That code has to add in pmpro-change-role-custom-roles.php
When you will add that code you have to know which level ID will get which role user.
To pick up your website all roles without admin install user role editor plugin and then you have to go to users > users role editor and the select role and know what is role name and ID. 
That role ID will go in that code ID parameter. 
In my case, that role ID was: stm_lms_instructor. 

Let me know if anything else. 
Thank you.

Friday, July 5, 2019

How to add free SSL certification at Godaddy


Without change nameserver address at Godaddy hosting we can add free SSL. We know that give free SSL and we can add that SSL certification in your website but then we have to change domain nameserver to Cloudflare. But many clients are not want to change that nameserver.

So that information is:

We will add free SSL with now. Follow these steps:

Step 1: Go to and go to free SSL certification wizard section and click on start.

Step 2: SEE

Step 3: SEE and click on next button

Step 4: SEE

Step 5: SEE

Step 6: SEE
Go to Cpanel File manager and that domain pointer folder. In that folder create one folder. NAME: .wellknown and in that .wellknown you will create another folder. NAME: acme-challenge. 

In the acme-challenge folder, you will upload those verification 2 files. see and click the Verification next button.

Step 7: Go to Cpanel and click on SSL/TLS. SEE

Step 8:  Click on install and manage SSL for your site (HTTPS).

Step 9:

Step 10:

Step 11: click on Intall Certificate button see


Step 12:

To redirect from main domain to https://
you can create a file .htaccess at your domain pointer folder
and add those 3 lines codes:

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


That's it.

Thursday, June 20, 2019

How to add Facebook login system at WordPress website


Sometimes when we have tried to integrate facebook login system with WordPress website we face some problem so that I'm telling what will be right way within mins you can add that login system in your website anywhere and that will work 100%.

1st: We have to active plugin Super socializer

2nd: We have to create a Facebook login app


1st: Go to and then click on add new app
Enter your app name and password of your facebook that app will create

Then select Integrate Facebook Login and click on continue

2nd: click on the quickstart

3rd: click on www and enter your website URL and click on save and click on continue.

4th: then you will get next button for 3 times but click on next, next, next.

5th: go to setting > basic and enter your domain name, add your privacy policy page (If your website has no page you can create one and you can keep empty) and also select the category of your website and click on save changes.

No need to change setting > advance page. Keep the same to the same setting that has already.

6th: go to facebook login > setting and then enter one URL at Valid OAuth Redirect URIs field
My website URL is so that URL will be

so /?SuperSocializerAuth=Facebook  you have to add after your website URL that is the main concern.
then click on save changes.

7th: status will be on see

8th: now collect app id and app secret

9th: go to plugin super socializer > social login from WordPress dashboard and add that app id and app secret and save that setting.

10th: you can off sharing button from here

11th: now that Facebook icon will show in your wp-admin login page automatically. 
If you want to add that login icon in any other page then use shortcode. I will prefer that code 

[TheChamp-Social-Linking title="Link your Social Accounts"]

For more shortcode, you can see that image

If anything else please knock with me at here

Thank you.

Sunday, December 23, 2018

Changing default avatar size cropped/used by BuddyPress,

How to change BuddyPress Avatar Thumbnail size and Profile image:

1) create a bp-custom.php file in your wp-content/plugins directory.
2) add that codes

if ( ! defined( 'BP_AVATAR_THUMB_WIDTH' ) )
    define( 'BP_AVATAR_THUMB_WIDTH', 80 ); //change this with your desired thumb width

if ( ! defined( 'BP_AVATAR_THUMB_HEIGHT' ) )
    define( 'BP_AVATAR_THUMB_HEIGHT', 80 ); //change this with your desired thumb height

if ( ! defined( 'BP_AVATAR_FULL_WIDTH' ) )
    define( 'BP_AVATAR_FULL_WIDTH', 310 ); //change this with your desired full size,weel I changed it to 260 :)

if ( ! defined( 'BP_AVATAR_FULL_HEIGHT' ) )
    define( 'BP_AVATAR_FULL_HEIGHT', 310 ); //change this to default height for full avatar

Thank You.

Monday, April 2, 2018

How to install Zen Coding (now called Emmet) with Sublime Text 3

Now I'm going to tell the full instruction of how to add Emmet on Sublime Text 3.

1st we have to install package controller.
go to and collect code
I'm using Sublime Text 3
My code:
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( '' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

2nd open Sublime Text 3. go to view > show consol 

3rd past that code and pass enter.

4th close this Sublime Text 3 application and open it again

5th after open Sublime Text 3 again go to tools and open command palette see

6th type inatall package and chick on it see

7th type emmet and click on it.

last you can see this page

8th restart sublime text 3 again.

Now you can enjoy your code. Type html:5 and ctrl + e !!!

Friday, December 15, 2017

Tanda Router configurations and WiFi configuration laptop and how to change admin password if you have not remember

One Broadband internet that will run on one pc with router data cable and one laptop with wifi.
So you can follow this instruction
Open your Laptop
hardware: connect the broadband line to your laptop directly
click right on wifi icon and go to open network and sharing center

go to change adapter setting

click on ethernet property or local area connection properly

double click on internet protocol version 4 and setup all internet provider address. Select Use the following IP and put all field and select use the DNS server address and put all file. You can get those setting from your internet provider when they have given 1st connection on your personal computer or laptop directly with landline.

I will prefer you will want always setup connection directly on pc, not laptop. After their setup, you can collect that information

Collect mac address. Open cmd and type ipconfig/all from your PC
you can see ethernet adapter physical address so copy this address and collect

click on configure

then enter mac address on this value. Remember this mac address will be your pc mac address

try to connect if not connect then collect username and password to your internet provider.

click on setup new connection

and put your username and password

now the internet will be connected to a laptop with direct line.

Now Wifi Configuration: 
reset the router manually from router reset button 

After rest router tanda will create a user and back part of the router there is a pin number that is the password of your wifi but not working 

login with tanda with username admin and password admin also
and do 

click on advance and go to MAC Clone and add your pc mac address that is your pc mac address, change your admin password.

Laptop will be connected to a wifi connection

connect internet provider line to the router and now pc will run from the direct router with data cable and laptop will be connected to wifi. 

Thank You. 

Sunday, December 10, 2017

JavaScript Intro

What is javascript?

  • Javascript is lightweight, cross-platform, object-oriented computer programming language 
  • Javascript is one of three core technologies  of web development
  • Client-side: javascript was traditionally only used in browser 
  • Server-side: we can use javascript on the server as well with node.js 
jquery is a library of javascript or framework angular js and react 

console.log: It is a common object/method provided by debuggers (including the Chrome debugger and Firebug) that allow a script to log data (or objects in most cases) to the JavaScript console

PRIMITIVE Javascript Datatype:
Primitive this is not an object. simple datatype

  1. Number: Floating point number, for decimals and integer 
  2. String: Sequence of characters, used for text
  3. Boolean:  logical data type that can only be true and false 
  4. Undefine: Date type of variable which does not have a value yet
  5. Null: Also means 'non-existent'
Javascript has dynamic typing 

Friday, October 27, 2017