Object of class WP_Error could not be converted to string

get_term can return a WP_Error object in addition to a falsy value for term not found or an actual term row. You fix this, by adding an additional check: if (!$term) { continue; } Becomes: if (!$term || is_wp_error($term)) { continue; } You should also do this above the get_term_link call. $term = get_term($value, $fieldSettings[‘taxonomy’]); … Read more

418 header status, I’m a teapot [closed]

You were right Toscho, it is a plugin called ‘better WP-Security’ I did a search for ‘418’ as suggested in the files I had backed up via ftp and found this: $bwpsmemlimit = (int) ini_get( ‘memory_limit’ ) //if they’re locked out or banned die if ( ( $bwpsoptions[‘id_enabled’] == 1 ||$bwpsoptions[‘ll_enabled’] == 1 ) && … Read more

“Notice: Undefined index:” error when adding new content?

Whoever wrote your theme didn’t bother to verify the existence of array keys before using them. The error is happening because the key album_tracks_metabox_nonce doesn’t exist in the $_POST array. The line likely should be: if ( !isset($_POST[‘album_tracks_metabox_nonce’]) || !wp_verify_nonce($_POST[‘album_tracks_metabox_nonce’], ‘album_tracks_metabox’) ) { // whatever is in the if condition, likely `return` }

Error messages when adding code to function.php or trying to delete inactive plugin files

Your functions.php file is outputting instead of returning something, on line 519. Can you post whatever code/functions are around Line 519? EDIT: You have a syntax error in your cpt_Search_category_Filter() function. You have a couple stray semi-colons after closing braces. Change this: function cpt_Search_category_Filter($query) { $post_type = array(‘post’,’business_sold’); if ($query->is_search || $query->is_category) { $query->set(‘post_type’, $post_type); … Read more

Add image only in first post

The error you are getting is quite specific and tells you exactly what is wrong. Also debug errors are off topic here. Your real issue here is adding an image to the first post only, which you can accomplish with the build-in loop counter $current_post that starts at 0, so the first post will be … Read more

Error Logs to Diagnose Error 500 in LAMP

You are using Apache for your http server,it will keep it owns logs for access & errors, depending on how you have it configured. By default Apache will probably use the following logs; /var/log/httpd/access_log /var/log/httpd/error_log or /var/log/apache2/access_log /var/log/apache2/error_log Log locations are in your Apache Config (/etc/httpd/). Check here for details. Using WP_DEBUG The WP_DEBUG flag … Read more

How do I set up Debugging?

I use a plugin for this issue. Even if debug is set to false, it still prints error to the screen in red. It is easy and fast to create the plugin. In your plugins folder in your wordpress install, create a new file and call it anything you like, for instance, debugger-plugin.php. Open up … Read more

Error 310 too many redirects after switching domains

It is infinitely redirecting. I have seen (and created) this problem a lot when trying to do either a non-www to www domain or a non-trailing-slash to trailing-slash redirect. Did you or an SEO firm do 301 redirects after a new site launch and can you post the contents of your .htaccess file?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)