Posts Tagged ‘wordpress’

How to Fix the Error ‘Home Catchable fatal error: Object of class WP_Error could not be converted to string in /home/computerites.com/wp-content/themes/computerites/functions.php on line 144′

How to Fix the Error 'Home Catchable fatal error: Object of class WP_Error could not be converted to string in /home/computerites.com/wp-content/themes/computerites/functions.php on line 144'

 

Recently i found there is a error in my WordPress server logs.The error is "Home Catchable fatal error: Object of class WP_Error could not be converted to string in /home/computerites.com/wp-content/themes/computerites/functions.php on line 144".

I think this is due to the bread navigation.Because the page was not classified cause an error when get the page 's classification.So we can modify the code to fix this problem . Read more

Solution of Uncaught TypeError: Object #has no method in WordPress

Recently on the local computer to test wordpress ,jquery reported Uncaught TypeError: Object # has no method.The reason maybe jquery library conflict, but think of this theme is being used in the current site (website is no problem), in addition to load the jQuery library and some jQuery code, no additional jQuery code. So it should not be a problem here.

Then i think maybe the wordpress plugin caused the problem.After checking contrast, found that localthe the WP-PostViews plug even automatically load jquery library. Read more

How to Add Picture Alt Attribute Code Automatic in WordPress

How to add picture alt attribute code automatic in WordPress? We all know, the picture add alt attributes is conducive the search engine to find the picture.If the alt attribute is appropriate , perhaps the pictures can bring your website a lot of traffic.

However, we may find it is too much trouble to add the picture alt attribute one by one, especially the picture theme site.So is there a method of fully automatic adding to the site pictures alt attribute?
Read more

Six Ways to Solve WordPress Lost Password

Six ways to solve WordPress lost password

Sometimes,because this or that reasons,you could lost the WordPress password.If it happened,what can we do to  find the WordPress lost password? There are six methods to get the WordPress lost password.

1.Reinstall WordPress. We do not recommend this method, reinstall the WordPress you would download the WordPress code again and it is too much trouble. It is the worst method.

2.Use the WordPress forgot password feature. WordPress supports mail password recovery feature.If the administrator's e-mail account is valid, in the login interface, click the "forgot your password? " link, after you enter the correct email address, you can receive a password reset message.Then you can reset your WordPress lost password.

3.Delete the WP-config.php file under the WP directory, and then you visit the Web site, which will let you repeat the last installation step, so that you can set a new password of your WordPress.

4.Login phpMyAdmin, find the wp_users table of the WordPress database, here you can see the default user admin,password is encrypted. Now, we can modify this data, find the user_pass field, delete its long data, write down your new password, for example, 123456.Then, you will see a drop down box function, select MD5. This is to encrypt your password with MD5 algorithm, then save. In this way, you can login your WordPress by this password.

5.Use SQL statements to modify the WordPress lost password. Login phpMyAdmin into the WordPress database and execute the following SQL statement:
UPDATE wp_users SET user_pass = MD5('PASSWORD') WHERE wp_users.user_login ='admin' LIMIT 1;

6.Use PHP codes to retrieve the WordPress lost password. PHP method is also using the SQL query statement,but provides a user interface. Copy the following code and save it as password-Reset.php file, upload to your WordPress root directory, and then run this file, enter the password to reset you lost WordPress password.

<?php
//password reset
include("wp-config.php");
include("wp-blog-header.php");
if (empty($_POST['emergency_pass'])) {
?>
<form method="post">
set admin password: <input name="emergency_pass" type="password" />
<input type="submit" />
</form>
<?php
} else {
$sql = "UPDATE ".$wpdb->users." SET user_pass = '".md5($_POST['emergency_pass'])."' WHERE User_login = 'admin'";
$link = $wpdb->query($sql);
wp_redirect('wp-login.php');
exit();
}
?>