我想颠倒此代码列表项的顺序.基本上它是从最旧到最近的一组年,我试图扭转这一输出.
<?php
$j=1;
foreach ( $skills_nav as $skill ) {
$a = '<li><a href="#" data-filter=".'.$skill->slug.'">';
$a .= $skill->name;
$a .= '</a></li>';
echo $a;
echo "\n";
$j++;
}
?>
Run Code Online (Sandbox Code Playgroud) 我正在尝试将Woocommerce中的产品父类别添加为wordpress' body标签.
每次进入子类别时,父类别不再在body类别中.
可以编辑下面的内容来查找父类别并在body标签中添加吗?
也许像"product_parent_cat"这样的术语?试过这个并搜索他们的API但没有成功..
function woo_custom_taxonomy_in_body_class( $classes ){
$custom_terms = get_the_terms(0, 'product_cat');
if ($custom_terms) {
foreach ($custom_terms as $custom_term) {
$classes[] = 'product_cat_' . $custom_term->slug;
}
}
return $classes;
}
add_filter( 'body_class', 'woo_custom_taxonomy_in_body_class' );
Run Code Online (Sandbox Code Playgroud) 该图标显示在Safari中,但不显示在FF或Chrome中。
在本地开发中遇到以下错误:
Failed to decode downloaded font: http://client.dev/wp-content/themes/client/build/assets/fonts/icons/client.woff2
(index):1 OTS parsing error: head: Bad ppm of 13
(index):1 Failed to decode downloaded font: http://client.dev/wp-content/themes/client/build/assets/fonts/icons/client.woff
(index):1 OTS parsing error: head: Bad ppm of 13
Run Code Online (Sandbox Code Playgroud)
知道为什么吗?我可以以某种方式验证生成的字体文件吗?谢谢!