WordPressで公開済みの投稿総数と現在のページに表示されている表示数を出力したいのでR。
イメージとしては
表示数/投稿総数
という感じにしたいのでR。
そのために、出力したいphpに
<?php echo get_option('posts_per_page'); ?>/<?php $post_count = wp_count_posts()->publish; echo $post_count; ?>
で出力できるのでR。




この記事をシェアできます。
WordPressで公開済みの投稿総数と現在のページに表示されている表示数を出力したいのでR。
イメージとしては
表示数/投稿総数
という感じにしたいのでR。
そのために、出力したいphpに
<?php echo get_option('posts_per_page'); ?>/<?php $post_count = wp_count_posts()->publish; echo $post_count; ?>
で出力できるのでR。