Including non-wordpress pages within a single multisite domain

You could check for the referring page by using the wp_get_referer() function, which returns the referring page . See https://codex.wordpress.org/Function_Reference/wp_get_referer . But note that the function uses the $_SERVER[‘HTTP_REFERER’] value, which is set by the client, and can be spoofed (or disabled) by the client. So another alternative is to set a global variable that … Read more

Populate a drop down list with post titles across a multisite network

You should be able to replace this section: $posts = get_posts( ‘numberposts=-1&post_status=publish&post_type=questionnaire’ ); $choices = array(); $choices[] = array(“text” => “Select Questionnaire”, “value” => “”); foreach ( $posts as $post ) { $choices[] = array( ‘text’ => $post->post_title, ‘value’ => $post->post_title ); } // update ‘Select a Post’ to whatever you’d like the instructive option … Read more