Ejemplo n.º 1
0
/**
 * add the ad price field in the loop before the ad title 
 * @since 3.1.3
 */
function cp_ad_loop_price()
{
    if (is_page()) {
        return;
    }
    // don't do ad-meta on pages
    global $post;
    ?>
		
	<div class="price-wrap">
        <span class="tag-head">&nbsp;</span><p class="post-price"> 
        
        <span style="font-size:10px;"><?php 
    echo get_post_meta($post->ID, 'cp_divisa', true);
    ?>
  </span>
		
		
		<?php 
    if (get_post_meta($post->ID, 'price', true)) {
        cp_get_price_legacy($post->ID);
    } else {
        cp_get_price($post->ID, 'cp_price');
    }
    ?>
</p>
    </div>

<?php 
}
Ejemplo n.º 2
0
/**
 * add the ad price field in the loop before the ad title 
 * @since 3.1.3
 */
function cp_ad_loop_price()
{
    if (is_page()) {
        return;
    }
    // don't do ad-meta on pages
    global $post;
    if ($post->post_type == 'page' || $post->post_type == 'post') {
        return;
    }
    ?>
		
	<div class="price-wrap">
        <span class="tag-head">&nbsp;</span><p class="post-price"><?php 
    if (get_post_meta($post->ID, 'price', true)) {
        cp_get_price_legacy($post->ID);
    } else {
        cp_get_price($post->ID, 'cp_price');
    }
    ?>
</p>
    </div>

<?php 
}
Ejemplo n.º 3
0
function xtremecarousel()
{
    global $wpdb, $post;
    ?>

<?php 
    if (is_home()) {
        query_posts(array('post__in' => get_option('sticky_posts'), 'post_type' => APP_POST_TYPE, 'post_status' => 'publish', 'orderby' => 'rand', 'posts_per_page' => 20));
    } else {
        if (is_tax()) {
            $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
            query_posts(array('post__in' => get_option('sticky_posts'), 'post_type' => APP_POST_TYPE, 'post_status' => 'publish', 'orderby' => 'rand', 'posts_per_page' => '-1', 'posts_per_page' => 20, 'ad_cat' => $term->slug));
        }
    }
    if (have_posts()) {
        ?>

<div id="services-example-1" class="theme1">

	<ul>
    <?php 
        while (have_posts()) {
            the_post();
            ?>
	<?php 
            $attachment = get_posts(array('post_type' => 'attachment', 'post_status' => null, 'order' => 'ASC', 'orderby' => 'menu_order', 'post_mime_type' => 'image', 'post_parent' => $post->ID));
            if ($attachment) {
                $url_thumb = TT . '?src=' . wp_get_attachment_url($attachment[0]->ID, false) . '&h=110&w=150';
                $url = TT . '?src=' . wp_get_attachment_url($attachment[0]->ID, false) . '&h=280&w=498';
            } else {
                $url_thumb = get_bloginfo('template_url') . '/images/no-thumb.jpg';
                $url = TT . '?src=' . get_bloginfo('template_url') . '/images/no-thumb.jpg&h=280&w=498&zc=3';
            }
            ?>
    
    	<!-- SLIDES -->
        <li>
			<img class="thumb" src="<?php 
            echo $url_thumb;
            ?>
" data-bw="<?php 
            echo $url_thumb;
            ?>
">
            <div style="margin-top:16px"></div>
            <a id="rb_title"><?php 
            if (mb_strlen(get_the_title()) >= 14) {
                echo mb_substr(get_the_title(), 0, 14) . '...';
            } else {
                the_title();
            }
            ?>
</a>
            <p id="rb_xtrmcarousel">
            	Under: <?php 
            if (get_the_category()) {
                the_category(', ');
            } else {
                echo get_the_term_list($post->ID, APP_TAX_CAT, '', ', ', '');
            }
            ?>
<br />
            	By: <span class="owner"><?php 
            the_author_posts_link();
            ?>
</span><br />
            	<span class="rb_price">Price: <?php 
            if (get_post_meta($post->ID, 'price', true)) {
                cp_get_price_legacy($post->ID);
            } else {
                cp_get_price($post->ID, 'cp_price');
            }
            ?>
</span>
            </p>
            <a class="buttonlight morebutton" href="#">View More</a>
            
            <!-- EXTRA SHOWN IN "BUTTON" EVENT -->
            <div class="page-more">

            	<a href="<?php 
            the_permalink();
            ?>
">

                <img class="big-image" src="<?php 
            echo $url;
            ?>
">
                </a>
                <div class="details_double">
<?php 
            //livechat
            $meta_values = get_post_meta($post->ID, 'myplugin_new_field', true);
            if (!empty($meta_values)) {
                $meta_values = htmlspecialchars_decode($meta_values);
                echo '<div class = "dazake_live_chat_page" >';
                echo $meta_values;
                echo '</div>';
            }
            ?>
                	<h2><a id="rb_title_inside" href="<?php 
            the_permalink();
            ?>
"><?php 
            if (mb_strlen(get_the_title()) >= 60) {
                echo mb_substr(get_the_title(), 0, 60) . '...';
            } else {
                the_title();
            }
            ?>
</a></h2>
                    <div class="price-wrap">
                    	<span class="tag-head">&nbsp;</span><p class="post-price"><?php 
            if (get_post_meta($post->ID, 'price', true)) {
                cp_get_price_legacy($post->ID);
            } else {
                cp_get_price($post->ID, 'cp_price');
            }
            ?>
</p>
                    </div>
                    <p id="rb_xtrmcarousel_inside">
                    	Under: <?php 
            if (get_the_category()) {
                the_category(', ');
            } else {
                echo get_the_term_list($post->ID, APP_TAX_CAT, '', ', ', '');
            }
            ?>
<br />
                        By: <span class="owner"><?php 
            the_author_posts_link();
            ?>
</span><br />
                        On: <?php 
            echo appthemes_date_posted($post->post_date);
            ?>
<br />
                    </p>
                    <p id="rb_xtrmcarousel_description">
                    	<?php 
            $tcontent = strip_tags(get_the_content());
            if (mb_strlen($tcontent) >= 200) {
                echo mb_substr($tcontent, 0, 200) . '...';
            } else {
                echo $tcontent;
            }
            ?>
                    </p>
                    <a class="buttonlight" href="<?php 
            the_permalink();
            ?>
">Go to Ad Details</a>
                </div>
                <div class="closer"></div>
            </div>
        </li>
        
    <?php 
        }
        ?>
    </ul>
    
    <!-- TOOLBAR (LEFT/RIGHT) BUTTONS -->
    <div class="toolbar">
    	<div class="left"></div><div class="right"></div>
    </div>
    
    <div class="clr"></div>
</div><!-- services-example-1 -->

<script type="text/javascript">
	jQuery(document).ready(function() {
	jQuery.noConflict();					 									
					
	jQuery('#services-example-1').services(
		{										
			width:900,
			height:290,							
			slideAmount:5,
			slideSpacing:20,							
			touchenabled:"on",
			mouseWheel:"on",
			slideshow:6000,
			callBack:function() { }
		});
	});
</script>                    
                    
<?php 
        wp_reset_query();
    } else {
        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
        query_posts(array('post_type' => APP_POST_TYPE, 'post_status' => 'publish', 'orderby' => 'rand', 'posts_per_page' => '-1', 'ad_cat' => $term->slug));
    }
}
Ejemplo n.º 4
0
						<span class="tag-head"></span><p class="post-price"><?php 
                if (get_post_meta($post->ID, 'price', true)) {
                    cp_get_price_legacy($post->ID);
                } else {
                    cp_get_price($post->ID, 'cp_price');
                }
                ?>
</p>

						<?php 
            } else {
                ?>

						<span class="tag-head"></span><p class="post-price-sticky"><?php 
                if (get_post_meta($post->ID, 'price', true)) {
                    cp_get_price_legacy($post->ID);
                } else {
                    cp_get_price($post->ID, 'cp_price');
                }
                ?>
</p>

						<?php 
            }
            ?>

	                    <div class="clr"></div>
          
           
            <p class="post-meta"><span class="folder"><?php 
            if (get_the_category()) {