Category: Wordpress
-
WordPress: Add or remove ‘www’ from your url
In most cases we see that when we try to open any site then it add ‘www’ in the url or remove from the url. This can be manage by Htaccess in general sites on the server. Wordpres provides a good facility to manage this url setting. 1. Go Settings > General 2. Set WordPress…
-
WordPress: How to get role name of a user by id
This code will print the role name of the user whose id is store in $user_id variable. Tweet This Post
-
WordPress: How to use Ajax at front side without using admin-ajax.php
Mostly all wordpress developers write the code to create widgets in admin side. and he use following code: var ajaxurl =”; var data = { action: ‘action_function_name’ }; // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php jQuery.post(ajaxurl, data, function(response) { alert(response); }); But when he wants to use…
-
WordPress: Retrieve all roles list
Many times we need to show all roles in a dropdown for our widget and we try to find in database but we are unable to get correct value.. so here I am providing a good solution to get all list of roles: Tweet This Post
-
WordPress Widgets vs Plugins, what’s the difference?
What is the difference between plugins and widgets? Plugins are functions that do something to your website. They could serve a back-end purpose and never be visible to you or the public. In the other hand, a widget usually is the representation of a plugin in the form of an object that can be placed…