Exemple #1
0
	
</script>
<?php 
if ($_POST['sendact'] == 'email_frnd') {
    require_once TEMPLATEPATH . '/monetize/send_to_friend/email_friend_frm.php';
    exit;
}
global $wpdb, $deal_db_table_name;
$postmeta_db_table_name = $wpdb->prefix . "postmeta";
$post_db_table_name = $wpdb->prefix . "posts";
$destination_path = site_url() . '/wp-content/uploads/';
$args = array('numberposts' => 1, 'meta_key' => 'is_expired', 'meta_value' => '0', 'post_status' => 'publish', 'post_type' => 'seller', 'meta_key' => 'status', 'meta_value' => '2', 'orderby' => 'DESC');
$recent_posts = get_posts($args);
if (mysql_affected_rows() > 0) {
    $post_large = bdw_get_images($destination_path . get_post_meta($post->ID, 'file_name', true), 'large');
    $post_images = bdw_get_images($destination_path . get_post_meta($post->ID, 'file_name', true), 'thumb');
    ?>

<div class="top_content">
  <?php 
    if (function_exists('dynamic_sidebar') && dynamic_sidebar('home_above')) {
    } else {
    }
    ?>
</div>
<!-- top content #end -->
<div class="box_header"></div>
<div class="box_bg">
  <div class=" box_bottom">
    <?php 
    if (count($recent_posts) > 0) {
Exemple #2
0
    <?php 
}
get_header();
?>
<div  class="<?php 
templ_content_css();
?>
" >
<!--  CONTENT AREA START -->

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_large = bdw_get_images(get_the_ID(), 'large');
        $post_images = bdw_get_images(get_the_ID(), 'thumb');
        ?>

<div class="entry">
  <div <?php 
        post_class('single clear');
        ?>
 id="post_<?php 
        the_ID();
        ?>
">
  <div class="post-meta">
      <?php 
        templ_page_title_above();
        //page title above action hook
        ?>
Exemple #3
0
function get_property_info_li($post)
{
    $thumbimage_arr = array();
    $thumbimage_arr = bdw_get_images($post->ID, $img_size = 'thumb');
    $thumb_img = $thumbimage_arr[0];
    ?>
	<li <?php 
    if (in_category(get_cat_id_from_name(get_option('ptthemes_featuredcategory')))) {
        echo 'class="featured"';
    }
    ?>
><?php 
    is_new_property($post->ID);
    ?>

				<div class="content_block">
					<div class="product_image">
<a href="<?php 
    the_permalink();
    ?>
">
					<?php 
    if ($thumb_img) {
        ?>

					<img src="<?php 
        echo $thumb_img;
        ?>
" height="109" width="164" alt="" title="" />
					<?php 
    } else {
        ?>

						<img src="<?php 
        bloginfo('template_directory');
        ?>
/images/img_not_available.png" alt=""  />
					<?php 
    }
    ?>
   

</a></div>
					<div class="content">
						<h3 class="clearfix"><span class="propertyaddress">
						<a href="<?php 
    the_permalink();
    ?>
">
						 <?php 
    the_title();
    ?>
 
 						</a></span>
						<?php 
    get_property_listing_price($post->ID);
    ?>

						</h3>
						<?php 
    $address = '';
    if (get_post_meta($post->ID, 'address', true)) {
        $address .= get_post_meta($post->ID, 'address', true) . ', ';
    }
    if (get_post_meta($post->ID, 'add_city', true)) {
        $address .= get_post_meta($post->ID, 'add_city', true) . ', ';
    }
    if (get_post_meta($post->ID, 'add_state', true)) {
        $address .= get_post_meta($post->ID, 'add_state', true) . ', ';
    }
    if (get_post_meta($post->ID, 'add_country', true)) {
        $address .= get_post_meta($post->ID, 'add_country', true);
    }
    if (get_post_meta($post->ID, 'add_zip_code', true)) {
        $address .= ' - ' . get_post_meta($post->ID, 'add_zip_code', true);
    }
    if ($address) {
        echo '<p class="address">' . $address . '</p>';
    }
    ?>

                        <?php 
    $cat_info_arr = get_property_cat_id_name($post->ID);
    ?>

                        <div class="property_detail"> 
                        <p> <span class="field"> <?php 
    _e(AREA_TEXT);
    ?>
 </span> <span>: <?php 
    echo get_post_meta($post->ID, 'area', true);
    ?>
 (<?php 
    echo get_area_unit();
    ?>
) </span> </p> 
                       <p> <span class="field"> <?php 
    _e(BEDS_TEXT);
    ?>
 </span> <span>:  <?php 
    echo get_post_meta($post->ID, 'bed_rooms', true);
    //echo $cat_info_arr['bed']['name'];
    ?>
 </span></p> 
                         <p><span class="field"> <?php 
    _e(BATHS_TEXT);
    ?>
 </span> <span>:  <?php 
    echo get_post_meta($post->ID, 'bath_rooms', true);
    ?>
 </span></p> 
                         
                        </div>
                        
                        <div class="property_detail"> 
                        <p> <span class="field"> <?php 
    _e(PRO_MLS_TEXT);
    ?>
 </span> <span>: <?php 
    echo get_post_meta($post->ID, 'mlsno', true);
    ?>
 </span> </p> 
                       <p> <span class="field"> <?php 
    _e(PRO_PROPERTY_ID_TEXT);
    ?>
 </span> <span>:  <?php 
    echo $post->ID;
    ?>
 </span></p> 
                         <p><span class="field"> <?php 
    _e(PRO_POSTED_ON_TEXT);
    ?>
  </span> <span>:  <?php 
    the_time('F j, Y');
    ?>
 </span></p> 
                         
                        </div>
                       
                        <p class="propertylistinglinks">
 						  <span class="agent"> <?php 
    _e(AGENT_TITLE);
    ?>
 : <a href="<?php 
    echo get_author_link($echo = false, $post->post_author, $author_nicename = '');
    ?>
" class="emailagent"><?php 
    echo get_the_author_meta('display_name', $post->post_author);
    ?>
 </a> </span>
							  
                        <span><a href="<?php 
    the_permalink();
    ?>
"><?php 
    _e(VIEW_MORE_DETAILS_TEXT);
    ?>
 &raquo;</a></span>
                        <?php 
    favourite_html($post->post_author, $post->ID);
    ?>

						
						</p> 
					</div>
				</div>
			</li>
<?php 
}
Exemple #4
0
        function widget($args, $instance)
        {
            // prints the widget
            extract($args, EXTR_SKIP);
            echo $before_widget;
            $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
            $category = empty($instance['category']) ? '' : apply_filters('widget_category', $instance['category']);
            $category = empty($instance['category']) ? '' : apply_filters('widget_category', $instance['category']);
            $number = empty($instance['number']) ? '5' : apply_filters('widget_number', $instance['number']);
            $post_type = empty($instance['post_type']) ? 'post' : apply_filters('widget_post_type', $instance['post_type']);
            ?>
			
		 <?php 
            if ($title) {
                ?>
 <h3 class="i_publication"><?php 
                echo $title;
                ?>
 </h3> <?php 
            }
            ?>
					<ul class="latest_posts"> 
			 <?php 
            global $post;
            if ($category) {
                $arg = "&category={$category}";
            }
            $arg = "&post_type={$post_type}";
            $today_special = get_posts('numberposts=' . $number . $arg);
            foreach ($today_special as $post) {
                setup_postdata($post);
                ?>
			<?php 
                $post_images = bdw_get_images($post->ID);
                ?>
	
			<li>
         
        
         <?php 
                if (get_the_post_thumbnail($post->ID)) {
                    ?>
             <a  class="post_img"  href="<?php 
                    the_permalink();
                    ?>
">
             <?php 
                    echo get_the_post_thumbnail($post->ID, array(50, 50), array('class' => ""));
                    ?>
             </a>
            <?php 
                } elseif ($post_images = bdw_get_images($post->ID)) {
                    ?>
             <a  class="post_img" href="<?php 
                    the_permalink();
                    ?>
">
             <img  src="<?php 
                    echo templ_thumbimage_filter(get_post_meta($post->ID, 'file_name', true), 50, 50, 1);
                    ?>
" alt="<?php 
                    the_title();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" width="50" height="50"  /> </a>
            <?php 
                }
                ?>
					
            <h4> <a class="widget-title" href="<?php 
                the_permalink();
                ?>
">
                  <?php 
                the_title();
                ?>
                  </a> <br />  <span class="post_author">by <?php 
                the_author_posts_link();
                ?>
 at <?php 
                echo $post->post_date;
                ?>
  / <?php 
                comments_popup_link(__('No Comments', 'templatic'), __('1 Comment', 'templatic'), __('% Comments', 'templatic'), '', __('Comments Closed', 'templatic'));
                ?>
 </span></h4> 
                  
                  <p> <?php 
                echo bm_better_excerpt(175, '');
                ?>
 <a href="<?php 
                the_permalink();
                ?>
"> <?php 
                _e('more...', 'templatic');
                ?>
 </a></p> 
        </li>
	<?php 
            }
            ?>
				</ul>
		
	<?php 
            echo $after_widget;
        }
Exemple #5
0
/*
Template Name: Page - Archives
*/
get_header();
?>
<div  class="<?php 
templ_content_css();
?>
" >
<!--  CONTENT AREA START -->

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_images = bdw_get_images($post->ID, 'large');
        ?>

<div class="entry">
  <div <?php 
        post_class('single clear');
        ?>
 id="post_<?php 
        the_ID();
        ?>
">
    <div class="post-meta">
      <h1><?php 
        the_title();
        ?>
</h1>
function templ_anything_slider_class_fun($post)
{
    ob_start();
    // don't remove this code
    /////////////////////////////////////////////////////
    if (get_the_post_thumbnail($post->ID, array())) {
        ?>
	<a class="post_img" href="<?php 
        echo get_permalink($post->ID);
        ?>
"><?php 
        echo get_the_post_thumbnail($post->ID, array(220, 220), array('class' => ""));
        ?>
</a>
	<?php 
    } else {
        if ($post_images = bdw_get_images($post->ID, 'large')) {
            global $thumb_url;
            $crop_image = vt_resize('', $post_images[0], 220, 220, $crop = true);
            $imgurl = $crop_image['url'];
            ?>
	<a class="post_img" href="<?php 
            echo get_permalink($post->ID);
            ?>
"><img src="<?php 
            echo $imgurl;
            ?>
" alt="<?php 
            echo get_the_title($post->ID);
            ?>
" title="<?php 
            echo get_the_title($post->ID);
            ?>
" /></a>
 
	<?php 
        }
    }
    ?>
    <div class="tslider3_content">
    <h3> <a class="widget-title" href="<?php 
    echo get_permalink($post->ID);
    ?>
"><?php 
    echo get_the_title($post->ID);
    ?>
</a></h3>
    <p><?php 
    echo bm_better_excerpt(605, ' ... ');
    ?>
</p>
    <p><a href="<?php 
    echo get_permalink($post->ID);
    ?>
" class="more"><?php 
    _e('Read More', 'templatic');
    ?>
</a></p>
   </div>
<?php 
    /////////////////////////////////////////////////////
    $return = ob_get_contents();
    // don't remove this code
    ob_end_clean();
    // don't remove this code
    return $return;
}