Пример #1
0
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
        <div class="pull-left">
        <?php 
            if (function_exists('wpmp_product_price')) {
                echo get_option('_wpmp_curr_sign', '$') . wpmp_product_price(get_the_ID());
            }
            ?>
        </div>
        <div class="pull-right">
            <?php 
            if (function_exists('wpmp_addtocart_link')) {
                echo wpmp_addtocart_link(get_the_ID());
            }
            ?>
        </div>
        <div style="clear: both"></div>
        </div>
    </div>

    <?php 
        }
    }
    wp_reset_query();
}
?>
    </div>
Пример #2
0
function wpmp_prouduct_meta($excerpt)
{
    global $post;
    if (get_post_type() != 'wpmarketplace') {
        return $excerpt;
    }
    if (is_single()) {
        return;
    }
    ob_start();
    ?>
    
<div class="wp-marketplace">
    <div class="well">
        <span class="pull-left">
            <?php 
    _e('Price: ', 'wpmarketplace');
    if (function_exists('wpmp_product_price')) {
        echo get_option('_wpmp_curr_sign', '$') . wpmp_product_price(get_the_ID());
    }
    ?>
        </span>
        <span class="pull-right">
            <?php 
    if (function_exists('wpmp_addtocart_link')) {
        echo wpmp_addtocart_link(get_the_ID());
    }
    ?>
        </span>
        <div class="clearfix"></div>
    </div>
    
</div>

<?php 
    $test = ob_get_clean();
    return $excerpt . $test;
}