New answers tagged

0 votes

Error: Attempt to read property "ID" on null

Issue coming if code is executed outside of the main WordPress loop or if there are no posts found by the query. you can first check if $wp_query->post is not null before attempting to access its ...
vijay pancholi's user avatar
0 votes

write developer debug statements to separate log

You can tell error_log() where to put its output: error_log( 'my debugging output', 3, '/my/debug/log/location/log.txt' ); It might be more convenient to add your own function: if ( ! function_exists(...
Pat J's user avatar
  • 11.7k
0 votes

Can not access .txt file which I uploaded through media

WordPress isn't doing this, those files are served by the server underneath WordPress, aka Nginx/Apache/etc. This is because there's a cost to loading WordPress and you don't want to pay that cost for ...
Tom J Nowell's user avatar
  • 58.7k
2 votes

Why does updating the front page give a 403, but no other page?

I found the source of the error, and I'll post my solution here if some lost soul with the same problem happens to stumble upon this question. The culprit was a piece of JavaScript at the start of the ...
Peter Jaric's user avatar

Top 50 recent answers are included