我已经直接修改了woocommerce插件中class-wc-checkout.php文件includes夹中的文件来添加自定义line item meta数据.override当我们覆盖woocommerce中的模板文件时,有没有办法从my-theme文件夹中获取class-wc-checkout.php文件?
如何top 5 most popular category在我的wordpress网站主页上列出(或最受欢迎的产品类别).我使用woocommerce插件的产品.
提前感谢任何建议或解决方案.
我已经为我的主题中流行的、最近的和评论最多的帖子创建了侧边栏小部件。我有一些不包含图像缩略图的帖子。这是我的小部件中 5 个帖子的热门查询帖子
<?php if (!empty($popular_posts)) { ?>
<div class="tab-pane fade in active" id="popular">
<div class="row">
<!-- ********************************************** -->
<!-- Popular Posts Tab -->
<!-- ********************************************** -->
<?php
$YPE_options = get_option( 'YPE_sidebar_option_name' );
$popular = new WP_Query( array(
'posts_per_page' => $popular_limit,
'meta_key' => 'post_views_count', // this is function within functions.php for counting post veiews
'orderby' => 'meta_value_num',
'order' => 'DESC'
));
while ( $popular->have_posts() ) : $popular->the_post();
$html = '<article>';
$html .= '<section class="bootstrap-nav-thumb">';
$html .= '<p>';
$html .= '<a …Run Code Online (Sandbox Code Playgroud)