How to make wordpress theme's Sidebar Widget Ready ?

it is very easy to make any wordpress theme's sidebar widget ready. in first step add following code to functions.php file if does not exists than create one.

<?php
register_sidebar();
?>


now add following code in your sidebar.php if does not exists than create one.

<aside>
<?php if ( !dynamic_sidebar() ) : ?>
<h2>Sidebar</h2>
<?php endif; ?>
</aside>


Congrats. You have a widget ready sidebar.

Code with some default and basic Styling.

for sidebar.php



<aside>
<?php if ( !dynamic_sidebar() ) : ?>
<h2>About</h2>
<p>This is my blog. i Love Wordpress.</p>
<?php wp_loginout(); ?>
<?php endif; ?>
</aside>


For functions.php



<?php
register_sidebar(array(
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
?>


How to change wordpress log in picture on log in page ?

To change wordpress logo/image from your wordpress log in page sign to your control panel. Change wordpress log in image on log in page Go to File Manager ----> your wordpress instalation directory and then wp-admin ------> images directory/folder. Find and replace the image logo-login.png with your own image or logo. Save change and now go to your log in page to view your changes works or not. if not try to find out what you have done wrong. Tip: It whould be a good change not to remove original wordpress logo from images just rename original wordpress logo .e.g. logo-loginwp.png and name your own image logo-login.png, in case of any problem just rename your original wordpress logo.

How to change WordPress multisite admin user name ?

How to change Wordpress Admin user name in CPanel with phpmyadmin ?

Log in to your CPanel control panel, select phpmyadmin under Database section. Select your database to edit. 1. Select wp_users table it will bring all the users tables in a row. 2.  Edit  the row where the “user_login” column is equal to “admin”. 3. Change the text admin in user_login line with your desired name. 4. Also change  admin with your desired name in user_nicename and display_name line. Save changes and now log in with your new user name to wordpress dashboard and click on admin link you will see that Network admin link is not visible.

Network Admin disappeared and not visible after changing wordpress admin user name in wordpress database ?

If you have changed your wordpress admin user name in your wordpress database, and you have installed wordpress multi site and buddypress, you can encounter a problem that network Admin link is not visible and disappeared. Ii also faced same problem after changing wordpress admin name, Network Admin link was disappeared. Actually when you change wordpress admin user name and your have installed multi site and/or buddypress also, you should also update wp_sitemeta table and you have to add your new user name here. Here is a solution to bring your network admin link back. 1. Click on wp_sitemeta to open the table. 2. find the row site_admins, in my case it look like this.
site_admins a:1:{i:0;s:6:"testit";}
Click edit and you will see a tex box containing
a:1:{i:0;s:5:"admin";}
above line, change admin with the user name that you entered before and also change the number 5 it is a character count of user name, in my case my new user name is "testit" so charcater count is 6.
a:1:{i:0;s:6:"testit";}
so i replaced text admin with testit and number 5 with 6. Click on Go button to save changes and now log in again to your wordpress dashboard and hope fully you will see Netword Admin link again. if you have any suggestions please post in comments section.

How to change wordpress admin name with PHPMyAdmin in CPanel ?


When you install wordpress by default wordpress assigns admin as user name to log in to wordpress dashboard. If you dont like it and want to change it but don’t know how to change wordpress admin user name continue reading, it is little bit difficult for new wordpress usres because you will have to make some  changes in database, that may cause big problem including loss all your data if you don’t be carefull, so please back up your database first, and than make changes.
I am using CPanel and and use phpmyadmin to access my wordpress database, so here is the instructions how to access wordpress database in CPanel and make changes in  wordpress database using phpmyadmin.

  1.  First of all log in to your CPanel control panel.
  2. Click on phpmyadmin link in Database section. New phpmyadmin page will open click on your database name from the right sidebar you will see a list of all wordpress database tables,
  3.  Select wp_users table and click on browse, that will bring all the record listed in tables.
  4.  Select Admin and click Edit to change your admin name to your desired name.
  5.  Now you will see name Admin under the field name user_login just change admin with your desird name here.
  6. 6. Click on Go button to Save your changes.

Now go to your wordpress log in page and try to log in with Admin
and password, you will see an error it means your changes are saved now log in with your new user name and you will see your wordpress dashboard.

Note :
Before making these changes must back up your wordpress databaseother wise you may lost all you data.
It is a good decision to install wordpress on sub domain or sub directory for testing purpose and always try new tricks to your test instalation before making any changes to your live site.

How to solve ‘You do not have sufficient permissions to access this page.’ in WordPress


Network Admin menu is not Visible and disappeared  in wordpress Dashbaord ?

I had installed wordpress multi site and  i decided to change my wordpress Amin user name with something new because it is a good idea to have something different user name than default admin. In case of Admin bad people already know your user name and they just need to your password to damage your website.

Here is a guide How to Change WordPress Admin user name ?  but after changing my admin name Network Admin menu was disappeared from wordpress dashboard.
Even when i tried to access directly by typing
mydomain.com/wp-admin/network
network admin address in browser location bar i got following error
‘You do not have sufficient permissions to access this page.’
I tried to find the solution on google but i failed to ind the answer, then i decided to change my new wordpress Admin user name with previous name that was Admin. So i followed the instruction How to Change WordPress Admin user name ? and set user name as Admin.
After setting old user name Admin i logged in successfully to wordpress dashbaord with user name Admin and my password and Network Admin was visible again in dashboard.
Note :
I am not an  wordpress expert but i always try to learn new things about wordpress, if you have solution of this problem please share in comments.

Update :

If you WordPress multisite installed, than you will have to change WordPress multisite admin user name. Read How to change  WordPress multisite admin user name ?

How to Hide/Disable PHP errors in WAMP Servers Windows ?

How to Hide/Disable PHP errors in WAMP Servers Windows ?


To hide php errors on WAMP server in windows open php.ini file, find following line of code

error_reporting = E_ALL

and replace it with

error_reporting = E_ALL & ~E_NOTICE

all future php errors will be hide/disable.

How to Show/Enable PHP errors in WAMP Servers Windows ?


To enable or show php errors in WAMP Server just add following line

error_reporting = E_ALL

in php.ini file.

Where to find and How to open php.ini file in wamp server ?

To open php.ini file in WAMP Server go to system tray click om WAMP Server icon go to PHP and click php.ini file to open it from fly out menu.

How to install/Enable php_curl Extension On Wamp Server in Windows XP?

I was trying to install StatusNet a micro blogging software on my windows XP pc, but i got an error displaying

Cannot load required extension: curl

To install and run Status Net on my pc curl must be installed/enabled.
When i enable curl extension in wamp server, i was able to install Status Net successfully on my Windows Xp Pc.

How to enable Curl in Wamp Sever on Windows XP ?

To install/enable curl in WAMP go to status bar and right click on WAMP icon and go to PHP -->

PHP Extension and than find and right click on php_curl to enable/install.






Restart WAMP Server after enabling php_curl ?

Now restart all services and try to install Sataus Net again. You should be able to install successfully.




Watch Vudeo How to install/enable Curl in Wamp Sever on Windows XP ?



Hope it will work for you.

How to Increase Import File Size in Wamp Server for Wordpress ?.

How to Increase Import File Size in Wamp Server.


Increase Maximum file upload file size in WAMP to upload large files in WordPress ?


I have installed wordpress lacaly using WAMPServer in windows pc. When I tried to upload a file, wordpress displayed an error

successful outsourcing.pdf exceeds the maximum upload size for this site.

successful outsourcing.pdf is file name that i wanted to upload. It means i had to increase maximum upload size to upload large files more than 2MB.

Watch Video



To increase file upload size in WAMP Server i added following two lines at the bottom of PHP.ini file, So, If anything goes wrong i can easily find and remove these two lines.

You can find php.ini file in C:\wamp\bin\php\php5.3.5 in windows or just left click on Wamp icon in system Tray. Now go to PHP --> php.ini and open it.



and the following lines at the bottom of php.ini file.




upload_max_filesize = 32M
post_max_size = 32M


Now Go to system tray right click on WAMP Sever icon and click Restart All Services. Log into wordpress dashboarad and try uploading large file.
You should be able to upload files which are more than 2MB in size.

How to add facebook like and send button in blogger template ?

To add facebook like and send button in blogger go to design ---> Edit HTML and click on Expand Widget Template now find

<data:post.body/>

and add following code right after that line of code.



<!-- Facebook Like+Send script Start -->
<b:if cond='data:post.isFirstPost'>
<div id='fb-root'/>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
</b:if>
<!-- Facebook Like+Send script End -->
<!-- Facebook Like+Send button Start -->
<div style='float:left;padding:5px 5px 5px 0;'>
<fb:like colorscheme='light' expr:href='data:post.url' font='' layout='standard' send='true' show_faces='false' width='450'/>
</div>
<!-- Facebook Like+Send button End -->