本文整理汇总了PHP中woo_post_meta函数的典型用法代码示例。如果您正苦于以下问题:PHP woo_post_meta函数的具体用法?PHP woo_post_meta怎么用?PHP woo_post_meta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woo_post_meta函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: widget
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
/* Our variables from the widget settings. */
$title = apply_filters('woo_home_blog_title', $instance['title'], $instance, $this->id_base);
$title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
$limit = $instance['limit'];
/* Before widget (defined by themes). */
echo $before_widget;
/* Display the widget title if one was input (before and after defined by themes). */
if ($title != '') {
echo $before_title . $title . $after_title;
}
// End IF Statement
/* Widget content. */
// Add actions for plugins/themes to hook onto.
do_action($this->woo_widget_cssclass . '_top');
// Load widget content here.
global $woo_options;
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$query_args = array('paged' => $paged, 'posts_per_page' => $limit);
query_posts($query_args);
if (have_posts()) {
$count = 0;
while (have_posts()) {
the_post();
$count++;
?>
<div <?php
post_class();
?>
>
<h2 class="title"><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
the_title_attribute();
?>
"><?php
the_title();
?>
</a></h2>
<div class="entry">
<?php
the_excerpt();
?>
</div>
<?php
woo_post_meta();
?>
</div><!-- /.post -->
<?php
}
// End WHILE Loop
} else {
?>
<div <?php
post_class();
?>
>
<p><?php
_e('Sorry, no posts matched your criteria.', 'woothemes');
?>
</p>
</div><!-- /.post -->
<?php
}
nxt_reset_query();
// Add actions for plugins/themes to hook onto.
do_action($this->woo_widget_cssclass . '_bottom');
/* After widget (defined by themes). */
echo $after_widget;
}
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:79,代码来源:widget-woo-blog.php
示例2: post_class
<article <?php
post_class('fix');
?>
>
<?php
echo woo_embed('width=580');
?>
<?php
if ($settings['thumb_single'] == 'true' && !woo_embed('')) {
woo_image('noheight=true&width=' . $settings['thumb_w'] . '&height=' . $settings['thumb_h'] . '&class=thumbnail ' . $settings['thumb_align']);
}
?>
<?php
woo_post_meta();
?>
<div class="post-body">
<header>
<h1><?php
the_title();
?>
</h1>
<p class="post-category"><?php
_e('Categories:', 'woothemes');
?>
<?php
the_category(', ');
开发者ID:jaiweb,项目名称:ASP,代码行数:31,代码来源:single.php
示例3: woo_tumblog_audio
function woo_tumblog_audio($post_id = 0, $count = 0, $pagetype = '')
{
$service = get_option('woo_url_shorten');
$category_link = woo_tumblog_category_link($post_id, 'audio');
?>
<div class="post audio-post">
<div class="posttype">
<a href="<?php
echo $category_link;
?>
" title="<?php
echo esc_attr(get_post_format_string(get_post_format()));
?>
"><img src="<?php
bloginfo('template_directory');
?>
/images/ico-audio.png" alt="" /></a>
</div><!-- /.posttype -->
<?php
if (is_singular()) {
?>
<h1 class="title"><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
the_title();
?>
"><?php
the_title();
?>
</a></h1>
<?php
} else {
?>
<h2 class="title"><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
the_title();
?>
"><?php
the_title();
?>
</a></h2>
<?php
}
?>
<?php
woo_post_meta();
?>
<div class="media">
<div id='mediaspace<?php
echo $post_id;
?>
'></div>
<?php
//Post Args
$args = array('post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post_id);
//Get attachements
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$link_url = $attachment->guid;
}
} else {
$link_url = get_post_meta($post_id, 'audio', true);
}
if (!empty($link_url)) {
?>
<script type='text/javascript'>
var so = new SWFObject('<?php
bloginfo('template_directory');
?>
/includes/tumblog/player.swf','mpl','440','32','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addParam('wmode','opaque');
so.addVariable('skin', '<?php
bloginfo('template_directory');
?>
/includes/tumblog/stylish_slim.swf');
so.addVariable('file','<?php
echo $link_url;
?>
');
so.addVariable('backcolor','000000');
so.addVariable('frontcolor','FFFFFF');
so.write('mediaspace<?php
echo $post_id;
?>
');
</script>
<?php
}
//.........这里部分代码省略.........
开发者ID:niko-lgdcom,项目名称:archives,代码行数:101,代码来源:theme-tumblog.php
注:本文中的woo_post_meta函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论