Multisite – Getting Meta query to select from wp_2 tables

From what I understood, you want to get products on US site from UK site. You can use switch_to_blog() to direct your queries to your sub-site. This function uses blog_id as parameter. So, in your case, switch_to_blog(2); //your code to fetch data restore_current_blog(); //this restores query to current sub-site. See documentation: https://developer.wordpress.org/reference/functions/switch_to_blog/

My connecting URL form in html to PHP does not work

I suspect the cause of your problems is here: $video = $_POST[‘subject’]; if ($video == true){ For example, if our subject is https://www.youtube.com/watch?v=dQw4w9WgXcQ then the check is: if ( ‘https://www.youtube.com/watch?v=dQw4w9WgXcQ’ == true ) And we know that true is not https://www.youtube.com/watch?v=dQw4w9WgXcQ, so the check here is incorrect. What we want is to check if $video … Read more

Altered Media Library URLs

If you add this in the functions.php file in your themes folder: add_filter(‘upload_dir’, ‘new_upload_dir’); function new_upload_dir( $param ){ $mydir=”/wp-content/uploads”; $param[‘path’] = $param[‘path’] . $mydir; $param[‘url’] = $param[‘url’] . $mydir; error_log(“path={$param[‘path’]}”); error_log(“url={$param[‘url’]}”); error_log(“subdir={$param[‘subdir’]}”); error_log(“basedir={$param[‘basedir’]}”); error_log(“baseurl={$param[‘baseurl’]}”); error_log(“error={$param[‘error’]}”); return $param; } It should change the directory the images are uploaded into.