php - Why does my WPDB enquiry on test server work but not on the live server? -


i using wordpress output ads on non wordpress page. html on non wordpress test server page is:

<?php require('/home/mcreativ/public_html/parts/imagerotator/wp-load.php'); echo init_ads(); ?> 

on test server have code in functions file , post type custom post type have created call manufacturer:

function init_ads() { echo $_server['document_root']; $serial = $_get["serial"];         // args query         $args = array(             'numberposts' => -1,             'post_type' => 'manufacturer',             'meta_key' => 'smashing_post_class',             'meta_value' => $serial         ); $the_query = new wp_query( $args ); $the_query->the_post(); $meta= get_post_meta( get_the_id(), 'ad_rotator_group', true);   wp_reset_query();  // restore global post data stomped the_post().  echo adrotate_group($meta); } 

and on test url http://www.m1creative.org/noword/index.php?serial=57 works. passing in number 'serial' , extracting corresponding ad group displays correct ads on page. use serial = 57 valid ad group.

on live server page: https://www.partslocator.com.au/adsrotator/testnoword.php?serial=57 doesn't work.

this html of live server non wordpress page:

<?php require('/var/www/plm/data/www/partslocator.vm-host.net/adsrotator/wp-load.php'); echo init_ads(); ?> 

if change echo adrotate_group($meta); echo adrotate_group(1); correct result , ads display.

i not using loop in query there ever going 1 result.

is https causing me problems or there else haven't spotted?


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -