View Single Post
  #12  
Old June 17th, 2013, 10:49 AM
DohRayMi DohRayMi is offline
 
Join Date: Feb 2013
Posts: 167
Default

Hi,
I put the code into the functions.php file, with just 1 merchant to test it, but it messed up that part of the site, but now I can't get the functions.php file to save, it just goes to a blank page. I took the code out using FTP, and restored the file back to where it was just before I started, using a copy I had made, but I still can't save it.
My site is working OK.

Any idea what I did wrong?

I already have another Datafeedr function in there, although that didn't seem to matter earlier.

Being presumptious!, here's the entire code (it's a child theme)

<?php
################################# FIX IE 7 bugs #############################################
add_action( 'wp_head', 'ie_conditional' );
if (!function_exists('ie_conditional')) {
function ie_conditional()
{
echo "
<!--[if IE 7]>
<style>
#sidebar { margin-top:-16px;}
body.home #sidebar { margin-top:0px;}
#plusone-div {padding: 0 0 10px !important;}
#plusone-div {position:absolute;margin:12px 0 0 0 !important;display:inline;padding: 0 0 10px !important;}
</style>
<![endif]-->
<!--[if IE 8]>
<style>
#plusone-div {position:absolute;margin:12px 0 0 0 !important;display:inline;padding: 0 0 10px !important;}
</style>
<![endif]-->
";
}}
################################# END FIX FOR FACEBOOK LIKE THUMB URL ##########################################
function dfr_get_merchants() {
global $wpdb;
$merchants = $wpdb->get_results("SELECT merchant, merchant_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant");
$html = '<option value="">Select a merchant</option>';
foreach ($merchants as $k => $v) {
if (trim($v->merchant) != "") {
$selected = (strip_tags($_GET['merchant_id'])==$v->merchant_id) ? ' selected="selected"' : '';
$html .= '<option value="'.$v->merchant_id.'"'.$selected.'>'.$v->merchant.'</option>';
}
}
return $html;
}
?>


Thank you so much if you can help, again.
Philip.