WP Debug set to true but still wsod
WP Debug set to true but still wsod
WP Debug set to true but still wsod
Try using the php error log to debug your issue. You can find the error log using this command in the terminal is you are using linux. sudo su cd /var/log/apache2/ sudo gedit error.log Now if you debug properly you will get to know where the changes went wrong.
While there are some WP–specific solutions that track template files, for complicated projects pretty much the only reliable list is using get_included_files() PHP function at the end of page load. It would give you everything, including WP core, but filtering it down to theme is relatively easy.
You are probably annoyed by too many DEBUG messages of unrelated plugins. The best solution I found for this was to turn on DEBUG logging only if a certain URL is matched: if (strpos($_SERVER[‘QUERY_STRING’], ‘page=myplugin’) !== false) define(‘WP_DEBUG_LOG’, true); else define(‘WP_DEBUG_LOG’, false);
Two lines of code could hide many things but I find an error: post_title is an attribute and not a method. echo $post->post_title; Reference: https://codex.wordpress.org/Class_Reference/WP_Post
Simple, wherever you’re working on data that’s output, just use var_dump($whatever_variable). You can also use print_r($a_variable)
I think, while saving the post, you won’t be able to display this result. You can try below instead – Log the output in the database. e.g. update_option(‘some_option’, wp_login_url($redirect)); And then print get_option(‘some_option’) directly somewhere outside this save_post hook callback (e.g. on wp_footer hook). You may need to refresh the page after save post to … Read more
Can’t show debug even after modifying wp-config
There are two aspects to WP_DEBUG: It configures PHP runtime to desired state, this is handled once in wp_debug_mode(). It is used as a state flag, that can be arbitrarily checked by code. Widely done both in core and more so in third party code. It is hard to make a guess how either of … Read more
You are possibly in a secondary loop within a page, in which case you would do well to pass the ID of the post excerpt that you’re trying to get. if ( get_the_excerpt($real_id_of_post_you_want_the_excerpt_for) ) { the_excerpt( $real_id_of_post_you_want_the_excerpt_for ); }