アーカイブにページネーションが表示されない

do | 創作・同人サイト制作支援サイト フォーラム WordPressテーマ「EASEL」について アーカイブにページネーションが表示されない

  • このトピックには0件の返信、1人の参加者があり、最後ににより4週、 1日前に更新されました。
1件の投稿を表示中 - 1 - 1件目 (全1件中)
  • 投稿者
    投稿
  • #4746 返信
    ゲスト

    はじめまして、更新履歴のショートコードや作品タイプが大変便利で愛用しております。
    このたびはアーカイブページのページネーションが機能しなく、お力添えをいただければと思って書き込ませていただきました。
    具体的な事例は以下のようになっております。

    ・利用サーバーはさくらのレンタルサーバー、PHPのバージョンは8.2.20 (モジュールモード)
    ・WordPressのバージョンは6.8、テーマはCANVAS on EASEL(EASELのバージョンは1.6.1)
    ・通常投稿のアーカイブ、作品のアーカイブ共にページネーションが表示されない(2ページ目が表示されないのではなく、ページネーション自体が出力されずに次の投稿群が続く)
    ・表示設定での表示件数は5件に設定してあり、投稿件数は5件を上回っている
    ・パーマリンクを設定し直しても効果はない
    ・bones_page_navi();をthe_posts_pagination();に差し替えても表示されない
    ・ページネーションを自作してから記述しても表示されない
    ・プラグインを全て無効化しても効果はない
    ・子テーマのfunctions.phpに問題となりそうな記述はない
    ・子テーマのarchive.phpを削除してもページネーションは表示されなかった

    自分で試せることは試しましたが、なにぶん知識不足のため見落としている部分があるかもしれません。
    また、これが関係あるのかは不明ですが、archive.phpのthe_content();で出力した投稿内容に空白行を含めることができず、pタグにmarginを加えることで余白を作っています。
    以下が実際に子テーマにアップしているarchive.phpの記述になります。

    <?php get_header(); ?>
    <div id="content">
    <div id="inner-content" class="wrap cf">
    <main id="main" class="archive" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
    <h1 class="archive-top">Blog</h1>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article">
    
    <div class="archive-header">
    <h2><?php the_title(); ?></h2>
    <p class=" byline entry-meta vcard">
    <?php
    printf(__('<time class="updated" datetime="%1$s" itemprop="datePublished">%2$s</time>', 'bonestheme'), get_the_time('Y.m.d'), get_the_time(__('Y.m.d', 'bonestheme')));
    ?>
    </p>
    </div>
    
    <?php if ( has_post_thumbnail() ) : ?>
    <figure class="eye-catch" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
    <?php
    	$thumbnail_id = get_post_thumbnail_id();
    	$eye_img = wp_get_attachment_image_src( $thumbnail_id , 'full' );
    	$url = $eye_img[0];
    	$width = $eye_img[1];
    	$height = $eye_img[2];
    	$size = $width.'x'.$height.' size-'.$width.'x'.$height;
    	$attr = array(
    		'class' => "attachment-$size eye-catch-image",
    );
    
    //アイキャッチの表示
    if ($width && $height) {
    the_post_thumbnail(array($width, $height), $attr);
    } else {
    the_post_thumbnail('full', $attr);
    }
    ?>
    </figure>
    <?php endif; ?>
    
    <div class="archive-content">
    <?php the_content(); ?>
    </div>
    
    <div class="archive-footer"><i class="fa fa-tag" aria-hidden="true"></i>
    <?php printf( '<span class="category">' . __('', 'bonestheme' ) . '%1$s</span>' , get_the_category_list(' ') ); ?>
    <?php printf( '<span class="tag">' . __('', 'bonestheme' ) . '%1$s</span>' , get_the_tag_list('', ',','') ); ?>
    </div>
    </article>
    
    <?php endwhile; ?>
    
    <?php bones_page_navi(); ?>
    
    <?php else : ?>
    
    <header class="article-header">
    <h1><?php _e( 'ページが見つかりません。', 'bonestheme' ); ?></h1>
    </header>
    </article>
    
    <?php endif; ?>
    
    <div class="category-area">category:<?php
    $categories = get_categories();
    foreach ($categories as $category) {
        echo '<p class="category-name"><i class="fa fa-tag" aria-hidden="true"></i><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></p>';
    }
    ?>
    </div>
    <div id="page_top"><a href="#"><span class="arrow"></span></a></div>
    
    </main>
    
    <?php get_sidebar(); ?>
    
    </div>
    
    </div>
    
    <?php get_footer(); ?>

    消してはいけない記述は消していないつもりですが、何か不具合の原因になる箇所がありますでしょうか?
    archive-works.phpは子テーマにアップロードせず、そのまま使用しております。
    どうぞよろしくお願いいたします。

1件の投稿を表示中 - 1 - 1件目 (全1件中)
返信先: アーカイブにページネーションが表示されない
あなたの情報: