How page with random php file with query params generated

The site you linked isn’t a WordPress. You can make custom WordPress URL’s using WordPress’s URL Rewrite API. See https://codex.wordpress.org/Rewrite_API/add_rewrite_rule#Example , e.g.: function custom_rewrite_basic() { add_rewrite_rule(‘^anythinghere/([0-9]+)/?’, ‘index.php?page_id=$matches[1]’, ‘top’); } add_action(‘init’, ‘custom_rewrite_basic’); This makes a new URL format like yoursite.com/anythinghere/95 If that doesn’t meet your needs you can also edit .htaccess Editing your question to include … Read more

$wpdb not working wordpress plugin ajax call

The reason your wpdb call fails is because there is no wpdb. You’ve taken the incorrect route of using a standalone PHP file, so there is no WordPress API. WordPress never gets loaded. That’s not how you do AJAX in WordPress. The solution is to do the AJAX call correctly and register a REST API … Read more

Image path in childs theme

Use the ABSPATH constant defined in the wp-config.php: $filename = ABSPATH . ‘wp-content/uploads/webcam/webcamimage.jpg’; You don’t have to use basename() function since it would return only the last component from the full file path, i.e. webcamimage.jpg, and it isn’t what you want to use with filemtime() function.