【发布时间】:2016-11-28 08:00:32
【问题描述】:
我正在尝试将 wordpress 上一些帖子的标题加粗,我有这段代码:
<?php
$title_popup = sprintf(__('Uploaded on %s', 'cuar'), get_the_date());
$file_count = cuar_get_the_attached_file_count($post->ID);
if(strpos(get_the_title(get_the_ID()),'Garajes Gran')!==false){
?>
<tr>
<td class="cuar-title">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr($title_popup); ?>"><strong><?php the_title(); ?></strong></a>
</td>
<td class="text-right cuar-file-count">
<span class="label label-rounded label-default"><?php echo sprintf(_n('%1$s file', '%1$s files', $file_count, 'cuar'), $file_count); ?> </span>
</td>
</tr>
<?php
}
而且我没有得到我想要的,因为所有标题都显示为黑色。所以出了什么问题?我的头衔是:
Presupuestos (Garajes Gran Via) 0 files
Presupuestos (Viviendas) 0 files
Contratos (Garajes Gran Via) 5 files
Contratos (Viviendas Gran Vía) 6 files
Contadores de Agua 0 files
Estatutos (Viviendas) 1 file
Estatutos (Garajes Gran Vía)
非常感谢。
【问题讨论】:
标签: wordpress