【发布时间】:2013-09-30 12:38:12
【问题描述】:
我从 Codestag 的 Themeforest 购买了一个名为 Shift 的 WP 主题,它是一个非常易于使用和干净的 UI。它主要用于博客风格的帖子,他们已经创建了预制的博客帖子风格......
例如,“音频”帖子是文本和嵌入的音频文件。 “视频”是视频链接和文字,“照片”显然是照片和文字。
我的问题是这些无法自定义,而且我创建的博客文章类型是音频或视频,并包含艺术家的照片或专辑封面。我需要添加什么代码才能让这个预制帖子包含照片? (代码如下)
我的第二个问题是如何将顺序从音频文件、标题、文本更改为标题、照片文本和音频?
这是预制博客样式的代码:“音频”
<div class="hentry-inner">
<div class="entry-wrapper grids">
<?php get_template_part('content', 'meta'); ?>
<div class="entry-content grid-10 clearfix">
<?php
$embed = get_post_meta(get_the_ID(), '_stag_audio_embed', true);
if(!empty($embed)){
echo do_shortcode(htmlspecialchars_decode($embed));
}else{
stag_audio_player(get_the_ID());
}
?>
<?php if( is_single() ) { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } else { ?>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'stag'), get_the_title()); ?>"> <?php the_title(); ?></a></h2>
<?php } ?>
<?php
if(!is_singular()){
if(get_the_excerpt() != '') echo "<p>".strip_shortcodes(get_the_excerpt())."</p>";
}else{
the_content(__('Continue Reading', 'stag'));
wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'stag').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
}
?>
</div>
<span class="bottom-accent"></span>
</div>
</div>
非常感谢您的帮助! -彼得
【问题讨论】:
标签: wordpress post formatting format blogs