Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Populate Merchant page manually. (/showthread.php?t=8940)

DohRayMi April 10th, 2013 05:22 AM

Populate Merchant page manually.
 
Hi Guys,

I want to make a seperate page for each Merchant.
The problem is, visitors won't arrive at the page using a search, or the Merchant drop down list.
I am trying to categorise my site better, so they could arrive at the page by various methods.

Can I insert the Merchant name somewhere manually in the code on the page so that the info is all pulled in?

I hope that makes sense.

Thank you,
Philip.

Eric April 10th, 2013 09:19 AM

Hi Philip,

Yes, this is possible. There are 2 methods here and 1 method here.

Eric

DohRayMi April 10th, 2013 12:07 PM

Thanks Eric,

Sorry, I didn't explain it fully.

I have other merchants on my site besides the datafeedr ones, so I am using the site search, not the datafeedr search. (I already use the drop down feature from one of those posts and it works great)

I also have other information on the page related to the Merchant, and below that I want to show all their affiliate offers.

So someone arrives at the Merchant page, I need to fool Datafeeedr into pulling the Merchant info up.
Can I not just manually fill the info into [product.merchant] where the display should be (for example)? Or is that too simplistic?

Does that make sense?

Thanks,
Philip.

Eric April 10th, 2013 12:52 PM

Hi Philip,

I'm not following you. Maybe you mean something like this: /showthread.php?t=3734

Eric

DohRayMi April 10th, 2013 02:47 PM

Hi Eric,

thanks, unfortunately that's not quite the same, I don't have a first product to copy from.

Here's a test page I stuck up - http://www.dohraymi.com/city/na/online-vouchers/argento

I want to list all coupons from that Merchant below their information.

They are a jeweller, so they will be in the search results with other jewellers, some of whom I am an affiliate for, and others who go through my own voucher system, so I can't always use the Datafeedr method for getting them to that page in the first place.

So I need the code to display all coupons by Argento, without me having to manually update it.
If I could perform the search invisibly when the page loads it would work, but how?

Thanks,
Philip.

Eric April 10th, 2013 03:21 PM

Hi,

Why not just do modify the tutorial I linked to and change the line of code to this:

<?php echo datafeedr_tag('coupons_from_single_merchant?c=coup ons&amp;merchant='.get_the_title()); ?>

Then instead of putting that code into the Text widget, put it into your theme's single.php file within the Loop.

Eric

DohRayMi April 10th, 2013 03:48 PM

Hi,
sorry, please bear with me.

I still don't follow, where does the information to populate "get_the_title()" come from, or is that where I manually put the Merchant's name?

Thanks,
Philip.

Eric April 10th, 2013 06:04 PM

Hi,

That's the title of your post here: http://www.dohraymi.com/city/na/onli...chers/argento/

Eric

DohRayMi April 11th, 2013 06:15 AM

Hi again,
I still can't get this to work, I know I am missing something, so I have pasted the code below, could you tell me what's wrong please?

I have this code in the Text view of the page.
The only thing I changed was I named my view "web_codes_from_this_merchant" for my own clarity.


Code:

[product.each]
<?php echo datafeedr_tag('web_codes_from_this_merchant?c=coupons&amp;merchant='.get_the_title()); ?>
  <p>
    <a href="[product.link]"><strong>[product.name]</strong></a>
    from <span style="color:#999;font-size:85%;font-style:italic;">[product.merchant]</span><br />
    [coupon.description]<br />
    <small>
      <strong>Code:</strong> [coupon.code]<br />
      <strong>Restrictions:</strong> [coupon.restrictions]<br />
      <strong>Begin Date:</strong> [coupon.begin]<br />
      <strong>End Date:</strong> [coupon.end]<br />
    </small>
  </p>
[product.end]

Which produces this: http://www.dohraymi.com/city/na/online-vouchers/argento


Reding through the referenced thread, I also tried using this -
[DFR:web_codes_from_this_merchant?c=coupons&merchan t='.get_the_title()]
but it just returned the "No products found" message.

Thank you again,
Philip.

DohRayMi April 11th, 2013 06:18 AM

I don't know why that space keeps appearing in the word "coupons" but it's not in my actual code.

Eric April 11th, 2013 10:39 AM

Hi,

You need to remove this line from the code above:

<?php echo datafeedr_tag('web_codes_from_this_merchant?c=coup ons&amp;merchant='.get_the_title()); ?>

You need to put that line of code into your theme's single.php file.

Eric

DohRayMi April 11th, 2013 11:14 AM

Hi Eric,
thank you again.

Unfortunately, that just replaces the WHOLE page with the "No products found" message, so in my case, all that's on the screen are the words "Sorry, nothing available today."

I put the code into the child theme, rather than the parent, but that shouldn't matter, should it?

Thanks for your patience,
Philip.

Eric April 11th, 2013 11:38 AM

Hi,

Try changing this:

Code:

<?php echo datafeedr_tag('web_codes_from_this_merchant?c=coupons&amp;merchant='.get_the_title()); ?>
To this:

Code:

<?php echo datafeedr_tag('web_codes_from_this_merchant?c=1122594&amp;merchant='.get_the_title()); ?>
That worked for me.

Eric

DohRayMi April 11th, 2013 12:28 PM

No, still can't get it, aghhhh.

Actually, I forgot to say that I didn't call my coupons category "coupons", I called it "web_codes", but that doesn't make any difference, as I had been using that, and you gave me the reference number for that category anyway so you must have caught on - sorry!

What now?

Thanks again,
Philip.

Eric April 11th, 2013 12:33 PM

Hi,

It worked for me. I imported your store into my test site and it worked fine. The formatting was off but one thing at a time:



Things you need to make sure you do:

- make sure you are editing your blog's single.php file (or its equivalent).

- Make sure this code gets posted within The Loop:
Code:

<?php echo datafeedr_tag('web_codes_from_this_merchant?c=1122594&amp;merchant='.get_the_title()); ?>
Read more about The Loop here: http://codex.wordpress.org/The_Loop

- make sure you are not viewing a cached version of your page

Eric

DohRayMi April 11th, 2013 01:26 PM

Hi Eric,
thanks.

I can't find anythng in my single.php that directly relates to that tutorial, unfortunately there is no indictaion (to me) where the loop starts and ends.

I have tried it in a few places, but it was either showing the results in the header (although working!) or else it broke the site.

I know it's a big ask, but could you have a look below please? You might spot it straight away :)

Again, thank you.
Philip.

The listing I am using is a "place".

<?php
global $wpdb;
$child_dir = get_stylesheet_directory();
$child_fn_dir = get_stylesheet_directory() . '/library/functions/';
if (file_exists($child_dir.'/child.txt')) {
$ct_on=1;
} else{$ct_on=0;}

if(isset($_POST['sendact']) && $_POST['sendact']=='send_inqury')
{
if($ct_on && file_exists($child_dir.'/library/includes/send_inquiry_frm.php')){include_once ($child_dir. '/library/includes/send_inquiry_frm.php');}
else{require_once (TEMPLATEPATH . '/library/includes/send_inquiry_frm.php');exit;}
}elseif(isset($_POST['sendact']) && $_POST['sendact']=='email_frnd')
{
if($ct_on && file_exists($child_dir.'/library/includes/email_friend_frm.php')){include_once ($child_dir. '/library/includes/email_friend_frm.php');}
else{require_once (TEMPLATEPATH . '/library/includes/email_friend_frm.php');exit;}
}
elseif(isset($_POST['sendact']) && $_POST['sendact']=='claim_listing')
{
if($ct_on && file_exists($child_dir.'/library/includes/claim_listing_frm.php')){include_once ($child_dir. '/library/includes/claim_listing_frm.php');}
else{require_once (TEMPLATEPATH . '/library/includes/claim_listing_frm.php');exit;}
}
global $wp_query, $post;
$cat_array = array();
$blog_cat = array();
$blog_cat = get_option('ptthemes_blogcategory');
$blog_cat = get_blog_sub_cats_str($type='array');
/*$cagInfo = get_the_category();
foreach($cagInfo as $cagInfo_obj)
{
$cat_array[] = $cagInfo_obj->term_id;
}*/
if($post->post_type=='event')
{
$is_event_post = 1;
if($ct_on && file_exists($child_dir.'/library/includes/event_detail.php')){include_once ($child_dir. '/library/includes/event_detail.php');}
else{require_once (TEMPLATEPATH . '/library/includes/event_detail.php');}
}else
{
if($post->post_type=='post') //blog detail
{
$is_blog_post = 1;
if($ct_on && file_exists($child_dir.'/library/includes/blog_detail.php')){include_once ($child_dir. '/library/includes/blog_detail.php');}
else{require_once (TEMPLATEPATH . '/library/includes/blog_detail.php');}
}elseif($post->post_type=='place')
{
$is_place_post = 1;
if($ct_on && file_exists($child_dir.'/library/includes/place_detail.php')){include_once ($child_dir. '/library/includes/place_detail.php');}
else{require_once (TEMPLATEPATH . '/library/includes/place_detail.php');}
}
}
?>

Eric April 11th, 2013 01:28 PM

Hi,

It looks like the file you need to edit is this one: /library/includes/place_detail.php

Eric

DohRayMi April 11th, 2013 01:42 PM

Oh, I've been barking up the wrong tree :( D'oh

Before I spend hours working on trial and error, does anything jump out at you from this file? It's a bit bigger as luck would have it.

Philip.


<?php if(!$preview){get_header();}?>
<div id="wrapper" class="clearfix">
<div id="inner_pages" class="clearfix" >

<h1 class="main_title"><a href="<?php if($preview){echo '#';}else{the_permalink();} ?>" rel="bookmark" title="Permanent Link to <?php if($preview){echo $proprty_name;}else{the_title_attribute();} ?>">
<?php if($preview){echo $proprty_name;}else{the_title();} ?>
</a></h1>
<div class="likethis">
<?php if ( get_option('ptthemes_tweet_button') ) { ?>
<a href="http://twitter.com/share" class="twitter-share-button"><?php _e('Tweet');?></a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<?php } ?>
<?php if ( get_option('ptthemes_facebook_button') ) { ?>
<iframe <?php if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)){echo 'allowtransparency="true"'; }?> class="facebook" src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=button_count&amp;show_faces=false&am p;width=100&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>
<?php } ?>

<?php if ( get_option('ptthemes_google_button') ) { ?>
<div id="plusone-div"></div>
<script type="text/javascript">gapi.plusone.render('plusone-div', {"size": "medium", "count": "true" });</script>
<?php } ?>
</div>

<div class="breadcrumb clearfix">
<?php if ( get_option( 'ptthemes_breadcrumbs' )) { ?>

<div class="breadcrumb_in"><?php if(function_exists('bcn_display')){bcn_display();} ?></div>

<?php } ?></div>
<div class="clearfix"></div>

<div id="mobile-shortcuts"><a href="#sidebar"><button><?php _e('Contact Info');?></button></a> <a href="#comments"><button><?php _e('Reviews/Comments');?></button></a></div>

<div id="content" class="content_inner" >
<div class="single_post">
<?php if(have_posts() || $preview) :
if($preview && !$_REQUEST['alook'] && $_SESSION['property_info']['price_select']){$pkg_limit = get_property_price_info_listing('',$_SESSION['property_info']['price_select']);}
elseif(($preview && $_REQUEST['alook'] )||($preview && !$_SESSION['property_info']['price_select']) ){$pkg_limit = get_property_price_info_listing($_REQUEST['pid']);}
else{$pkg_limit = get_property_price_info_listing($post->ID);} ?>
<?php if($preview){
$thumb_img_counter = 0;
if(isset($_SESSION["file_info"]))
{ $post_images = array();
$image_src = array();
$tmpimgArr = explode(",", $_SESSION["file_info"]);
foreach($tmpimgArr as $image)
{
if($image){
$post_images[][0] = $image;
}
}

}elseif($_REQUEST['pid']){ $post_images = bdw_get_images($_REQUEST['pid'],'gallery');}
}else{ $post_images = bdw_get_images($post->ID,'gallery');}
//print_r($post_images);

global $thumb_url; /// get the mutiuser id
$img_p = get_img_p(get_option('ptthemes_image_x_cut'));### added image crop position
$img_zc = get_img_zc(get_option('ptthemes_image_zc'));### added image zoom or crop option
$img_q = '&amp;q='.get_option('ptthemes_image_q');### added image quality option
?>
<?php if(!$preview){the_post();} ?>
<div id="post-<?php if($preview){echo 'preview';}else{the_ID();} ?>" class="posts post_spacer">

<?php if(count($post_images)>0 && $pkg_limit['image_limit']!='0' ){ ?>
<section class="slider">
<div id="slider" class="flexslider">
<ul class="slides">
<?php

if(count($post_images)>0){
if($pkg_limit['image_limit']=='' || count($post_images)<$pkg_limit['image_limit']){$img_count = count($post_images);}else{$img_count =$pkg_limit['image_limit'];}
for($im=0;$im<$img_count;$im++){?>
<li>
<img src="<?php echo $post_images[$im][0]; ?>" style="max-height:400px;margin:0 auto;<?php
if($post_images[$im][1]){if($post_images[$im][2]>$post_images[$im][1]){echo 'max-width:'.round(((1-(400/$post_images[$im][2]))*100),2).'%';}
elseif($post_images[$im][1]<480){echo 'max-width:'.round((($post_images[$im][1]/588)*100),2).'%';}}?>" alt="<?php echo $post_images[$im][4];?>" title="<?php echo $post_images[$im][4];?>" />
<?php if($post_images[$im][5]){?><p class="flex-caption"><?php echo $post_images[$im][5];?></p><?php }?>
</li>
<?php }}?>
</ul>
</div>

<?php if(count($post_images)>1 && $pkg_limit['image_limit']!='0' && ($pkg_limit['image_limit']>1 || $pkg_limit['image_limit']=='') ){ ?>
<div id="carousel" class="flexslider">
<ul class="slides">
<?php
if(count($post_images)>0){
if($pkg_limit['image_limit']=='' || count($post_images)<$pkg_limit['image_limit']){$img_count = count($post_images);}else{$img_count =$pkg_limit['image_limit'];}
for($im=0;$im<$img_count;$im++){?>
<li>
<img src="<?php echo $post_images[$im][0] ?>" style="max-height:48px;margin:0 auto;<?php
if($post_images[$im][1]){if($post_images[$im][2]>$post_images[$im][1]){echo 'max-width:'.round(((1-(400/$post_images[$im][2]))*100),2).'%';}
elseif($post_images[$im][1]<480){echo 'max-width:'.round((($post_images[$im][1]/588)*100),2).'%';}}?>" alt="<?php echo $post_images[$im][4];?>" title="<?php echo $post_images[$im][4];?>" />
</li>
<?php }}?>
</ul>
</div>
<?php }?>
</section>


<script type="text/javascript">
<?php if(count($post_images)>1 && $pkg_limit['image_limit']!='0' ){ ?>
jQuery('#carousel').flexslider({
animation: "slide",
controlNav: false,
directionNav: true,
animationLoop: false,
slideshow: false,
itemWidth: 75,
itemMargin: 5,
asNavFor: '#slider'
});
<?php }?>
jQuery('#slider').flexslider({
animation: "slide",
controlNav: true,
animationLoop: true,
randomize: false,
directionNav: true,
slideshow: true,
sync: "#carousel",
start: function(slider){
//$('body').removeClass('loading');
}
});

</script>
<?php }?>

<?php if(get_post_meta($post->ID,'video',true) || $video){?>
<div class="video_main">
<?php if($preview){echo str_replace('\"', '', $video);}else{echo get_post_meta($post->ID,'video',true);}?>
</div>
<?php }?>
<?php if($preview){echo apply_filters( 'the_content', $proprty_desc );}else{the_content();} ?>
<?php if(($proprty_feature || get_post_meta($post->ID,'proprty_feature',true)) && $pkg_limit['property_feature_pkg']==1){?>
<div class="register_info">
<?php if($preview){echo $proprty_feature;}else{echo nl2br(get_post_meta($post->ID,'proprty_feature',true));}?>
</div>
<?php }?>
<p class="post_bottom clearfix"> <?php
if($preview){echo '<span class="category">'.implode(",", $_SESSION['property_info']['category']).'</span>';
if($kw_tags){echo '<span class="tags">'.$kw_tags.'</span>';}
}else{the_taxonomies(array('before'=>'<span class="category">','sep'=>'</span><span class="tags">','after'=>'</span>')); }?> </p>
</div> <!-- post #end -->


<div class="pos_navigation clearfix">
<div class="post_left fl"><?php GT_previous_post_link('%link',''.__('Previous'), true) ?></div>
<div class="post_right fr"><?php GT_next_post_link('%link',__('Next').'', true) ?></div>
</div>
</div> <!-- single post content #end -->
<div class="single_post_advt"><?php dynamic_sidebar(7); ?> </div>
<?php if(get_option('ptthemes_related_on_detailpage')!=' No'){ get_related_posts($post);} ?>

<?php endif; ?>
<div id="comments" class="clearfix"> <?php comments_template(); ?></div>
<?php if(get_option('ptthemes_moderation')=='Yes'){?>
<script type="text/javascript">
/* <![CDATA[ */
function reportThis(post_id){
jQuery("#report_this_ajax").load("<?php echo get_bloginfo('url').'/?ajax=report_form&post_id='; ?>"+post_id,function() {
jQuery('#report_this_ajax').slideToggle("200");
});
}
/* ]]> */
</script>
<div id="report_this" class="clearfix" onclick="reportThis(<?php echo $post->ID;?>)"><?php echo REPORT_THIS;?></div>
<div id="report_this_ajax" class="clearfix" style="display:none"></div>
<?php }?>
</div> <!-- content #end -->
<div id="sidebar">
<div class="company_info">
<?php
############################################# Fix for "Edit this Post" link taking user to backend ########################################
//edit_post_link( __( 'Edit this Post' ), "\n\t\t\t\t\t\t<p class=\"edit-link\">", "</p>\n\t\t\t\t\t" );
if(get_edit_post_link() && !$preview){
$var1 = array('wp-admin/post.php?post', '&amp;action=edit');
$var2 = array('?ptype=post_listing&pid', '');
$link = get_edit_post_link();
$output = str_replace($var1, $var2, $link);
echo '<p class="edit-link"><a href="'.$output.'">'.__('Edit this Post').'</a><a href="'.$output.'&upgrade=1" style="float:right;">'.__('Upgrade Listing').'</a></p>';
}
############################################# Fix for "Edit this Post" link taking user to backend ########################################
#######################OWNER VERIFIED FUNCTION ################
$post_id = get_post($post->ID);
$author_id = $post_id->post_author;
$user = new WP_User( $author_id );
$author_role = $user->roles[0];
if($preview){$is_owned = $claimed;}else{$is_owned = get_post_meta($post->ID,'claimed',true);}

if(get_option('show_owner_verified')==1){
if ($author_role =='author' && $is_owned!='0' ){?>

<p> <span class="i_verified"> <?php echo OWNER_VERIFIED_PLACE;?> </span></p>


<?php }}
################################################## #############
#################### claim listing function#######################################
if(get_option('claim_listing')==1){
if ($author_role =='administrator' || $is_owned=='0' ){
if ( is_user_logged_in() ) { ?>
<p class="edit-link"><a href="#" class="b_claim_listing"><?php echo CLAIM_LISTING_OWNER;?></a></p>
<?php } else { ?>
<p class="edit-link"><a href="<?php echo home_url().'/?ptype=login&amp;msg=claim'; ?>" ><?php echo CLAIM_LISTING_OWNER;?></a></p>
<?php }} }?>
<?php if(isset($_REQUEST['claim_request']) && $_REQUEST['claim_request']=='success'){?>
<p class="sucess_msg"><?php echo CLAIM_LISTING_SUCCESS;?></p>
<?php }elseif(isset($_REQUEST['emsg']) && $_REQUEST['emsg']=='captch'){?>
<p class="error_msg_fix"><?php echo WRONG_CAPTCH_MSG;?></p>
<?php }
########################### end claim listing function ############################
########################### author link function ############################
if ($is_owned=='1' && get_option('author_link')==1 && !$preview ){
?>
<p class="author-link"><?php _e('Author : '); the_author_posts_link(); ?></p>
<?php }

########################### end author link function ############################

#################### Google Analytics function #######################################
if(get_option('ga_stats')==1 && get_edit_post_link() && !$preview && $post->post_status=='publish' && $pkg_limit['google_analytics']==1){
if(get_edit_post_link()){
if ( is_user_logged_in() ) {
$page_url = $_SERVER['REQUEST_URI'];
if(isset($_REQUEST['ga_start'])){$ga_start = $_REQUEST['ga_start'];}else{$ga_start = '';}
if(isset($_REQUEST['ga_end'])){$ga_end = $_REQUEST['ga_end'];}else{$ga_end ='';}
?>
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){

jQuery("#ga_stats p").load("<?php echo get_bloginfo('url').'/?ptype=ga&ga_page='.$page_url; ?>");

});
/* ]]> */
</script>
<div id="ga_stats"><p><img src="<?php echo get_bloginfo('template_directory').'/images/'; ?>ajax-loader.gif" /></p></div>
<?php }}}
########################### end Google Analytics function############################
?>

<p> <span class="i_location"><?php _e('Address :'); ?> </span> <?php if($preview){echo $address;}else{echo get_post_meta($post->ID,'address',true);} ?> </p>
<?php if(get_post_meta($post->ID,'website',true) || $website){
if($preview){}else{$website = get_post_meta($post->ID,'website',true);}
if(!strstr($website,'http'))
{
$website = 'http://'.get_post_meta($post->ID,'website',true);
}
?>
<?php if($website && $pkg_limit['website_pkg']==1){?>
<p> <span class="i_website"><a href="<?php echo $website;?>" target="_blank" ><strong><?php _e('Website');?></strong></a> </span> </p>
<?php }?>
<?php }?>

<p> <?php favourite_html($post->post_author,$post->ID); ?></p>

<?php if(($timing || get_post_meta($post->ID,'timing',true)) && $pkg_limit['timing_pkg']==1){?>
<p> <span class="i_time"> <?php echo EVENT_TIMING;?> : </span> <?php if($preview){echo $timing;}else{echo get_post_meta($post->ID,'timing',true);}?> </p>
<?php }?>
<?php if(($contact || get_post_meta($post->ID,'contact',true)) && $pkg_limit['contact_pkg']==1 && get_option('ptthemes_contact_on_detailpage')=='Yes ' && get_post_meta($post->ID,'contact_show',true)!='No'){?>
<p> <span class="i_contact"> <?php echo EVENT_CONTACT_INFO;?> :</span> <?php if($preview){echo $contact;}else{echo get_post_meta($post->ID,'contact',true);}?> </p>
<?php }?>

<?php if(($email || get_post_meta($post->ID,'email',true)) && $pkg_limit['email_pkg']==1 && get_option('ptthemes_email_on_detailpage')=='Yes' && get_post_meta($post->ID,'email_show',true)!='No'){?>
<p> <span class="i_email2"><a href="#" class="b_send_inquiry" ><?php echo SEND_INQUIRY;?> </a> | <a href="#" class="b_sendtofriend"><?php echo SEND_TO_FRIEND;?></a></span></p>
<?php if($_REQUEST['send_inquiry']=='success'){?>
<p class="sucess_msg"><?php echo SEND_INQUIRY_SUCCESS;?></p>
<?php }elseif($_REQUEST['sendtofrnd']=='success'){?>
<p class="sucess_msg"><?php echo SEND_FRIEND_SUCCESS;?></p>
<?php }elseif($_REQUEST['emsg']=='captch'){?>
<p class="error_msg_fix"><?php echo WRONG_CAPTCH_MSG;?></p>
<?php }?>
<?php }?>


<?php if(!$preview){echo get_post_custom_listing_single_page($post->ID,'<p><span class="post_cus_field {#HTMLVAR#}">{#TITLE#} : </span>{#VALUE#}</p>');}
elseif($preview && $_REQUEST['alook']){echo get_post_custom_listing_single_page(mysql_real_esc ape_string($_REQUEST['pid']),'<p><span class="{#HTMLVAR#}">{#TITLE#}</span> : {#VALUE#}</p>');}else{echo get_post_custom_listing_single_page_preview($post->ID,'<p><span class="post_cus_field {#HTMLVAR#}">{#TITLE#} : </span>{#VALUE#}</p>');} ?>

</div>

<div class="company_info2">
<?php if(!get_option('ptthemes_disable_rating')){ ?>
<div class="hreview-aggregate">
<p> <span class="i_rating">


<?php _e('Rating');?> :</span> <span class="single_rating"> <?php echo get_post_rating_star($post->ID);?></span><br />



<span class="rating">
<?php if($preview){$avg_rating = 0;}else{$avg_rating = get_post_average_rating($post->ID);}
if($avg_rating==0) {echo 0;}
if($avg_rating>=1 && $avg_rating<1.25 ) {echo 1;}
if($avg_rating>=1.25 && $avg_rating<1.75 ) {echo 1.5;}
if($avg_rating>=1.75 && $avg_rating<2.25 ) {echo 2;}
if($avg_rating>=2.25 && $avg_rating<2.75 ) {echo 2.5;}
if($avg_rating>=2.75 && $avg_rating<3.25 ) {echo 3;}
if($avg_rating>=3.25 && $avg_rating<3.75 ) {echo 3.5;}
if($avg_rating>=3.75 && $avg_rating<4.25 ) {echo 4;}
if($avg_rating>=4.25 && $avg_rating<4.75 ) {echo 4.5;}
if($avg_rating>=4.75 && $avg_rating<=5 ) {echo 5;}
?></span><?php _e('/5 based on');?> <span class="count"><?php if($preview){$rating_count = 0;}else{$rating_count = get_post_rating_count($post->ID);} echo $rating_count; ?></span> <?php _e('user');?> <?php if($rating_count == 1){_e('review.');}else{_e('reviews.');}?>
<br />
<span class="item">
<span class="fn"><?php if($preview){echo $proprty_name;}else{the_title();} ?><br />
<?php if($post_images[0][0]){ ?><img src="<?php echo $post_images[0][0]; ?>" height="50px" class="photo" alt="<?php if($preview){echo $proprty_name;}else{the_title();} ?>"/> <?php }?> </span></span>

</p></div><?php }?>
<div class="share clearfix">
<div class="addthis_toolbox addthis_default_style">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=<?php if(get_option('ptthemes_addthis_username')){echo get_option('ptthemes_addthis_username');}else{ echo 'ra-4facd1303678e5c0';}?>" class="addthis_button_compact sharethis"><?php _e('Share');?></a>
</div>


</div>

<div class="links">
<?php if(($twitter || get_post_meta($post->ID,'twitter',true)) && $pkg_limit['twitter_pkg']==1){?><a href="<?php if($preview){echo $twitter;}else{echo get_post_meta($post->ID,'twitter',true);}?>" class="i_twitter" target="_blank"> <?php _e('Twitter');?> </a> <?php }?>
<?php if(($facebook || get_post_meta($post->ID,'facebook',true)) && $pkg_limit['facebook_pkg']==1){?><a href="<?php if($preview){echo $facebook;}else{echo get_post_meta($post->ID,'facebook',true);}?>" class="i_facebook" target="_blank"><?php _e('Facebook');?> </a><?php }?>
</div>




</div> <?php if($pkg_limit['link_business_pkg']==1 && get_business_events_new() && !$preview): ?>
<div class="widget">
<div class="links"><h3><?php _e('Events'); ?></h3>
<?php echo get_business_events_new(); ?>
</div></div>
<?php endif; ?>

<?php if($pkg_limit['link_business_pkg']==1 && get_business_events_old() && !$preview): ?>
<div class="widget">
<div class="links"><h3><?php _e('Past Events'); ?></h3>
<?php echo get_business_events_old(); ?>
</div></div>
<?php endif; ?>

<!-- company info -->
<div class="sidebar_in"><?php dynamic_sidebar(8); ?> </div>
</div> <!-- sidebar #end -->
</div>
<?php if(!$preview){require_once (TEMPLATEPATH . '/library/includes/popup_frms.php');}?>
<?php get_footer(); ?>

Eric April 11th, 2013 01:47 PM

Ooohhh... that's a nasty looking file. However, I would paste in the shortcode code right after:

PHP Code:

<?php if($preview){echo apply_filters'the_content'$proprty_desc );}else{the_content();} ?>


DohRayMi April 11th, 2013 02:42 PM

Thanks Eric,
no luck I'm afraid.
I will try asking where I bought the theme, but they are a bit weird so I may or may not get an answer.
Thanks so much for your help, sorry it took so long.
Regards,
Philip.
PS: If you do think of something else please do let me know, it can take days to get a response either way.


All times are GMT -5. The time now is 12:56 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.