已解决
0

我可以得到指定文章的ID,我想通过这篇文章的ID去获取这篇文章的评论总数应该怎么写啊?有哪位大神赐教一下呗!

6 个回答

WordPress日记
超哥
行业大佬
行业大佬
时间: 2020年08月20日

这个我知道,你可以去我的文章中看一下

    最佳
    WordPress日记
    超哥
    行业大佬
    行业大佬
    时间: 2020年08月20日

    @WordPress日记

    回复一个看看怎么样

    <form id="commentform" name="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post">
        <textarea onclick="window.wsocial_dialog_login_show();" class="message_comment" id="comment" name="comment" placeholder="<?php if($_GET['replytocom']){ echo '@ '.get_comment($_GET['replytocom'])->comment_author;}else{echo '赶紧来发表讨论吧!';}?>" readonly></textarea>
        <div class="commentbottom">
            <span>无意义的评论将很快被删除,账号将被禁止发言。</span>
            <a href="javascript:void(0);" onclick="window.wsocial_dialog_login_show();" class="commentbutton button medium black right">发表评论</a>
            <span class="numlimit">0/500</span>
        </div>
        <?php comment_id_fields(); ?>
        <?php do_action('comment_form', $post->ID); ?>
    </form>
    WordPress日记
    超哥
    行业大佬
    行业大佬
    时间: 2020年08月20日

    @WordPress日记

    这个方法还真不错哦

WordPress日记
超哥
行业大佬
行业大佬
时间: 2020年08月20日
<?php if(is_home()){?>
                <h1 class="logo">
                    <a href="<?php bloginfo('url');?>" title="<?php the_field('web_title','option');?>">
                        <img src="<?php the_field('web_logo','option');?>" alt="<?php the_field('web_title','option');?>">
                    </a>
                </h1>
            <?php } else {?>
                <div class="logo">
                    <a href="<?php bloginfo('url');?>" title="<?php the_field('web_title','option');?>">
                        <img src="<?php the_field('web_logo','option');?>" alt="<?php the_field('web_title','option');?>">
                    </a>
                </div>
            <?php } ?>

 

1 2