• sinisalminen

    (@sinisalminen)


    We have the wp pagination in use in CPT archive and in normal article archive. In normal archive page pagination works, but in CPT archive page pagination breaks with languages, if trying to go to the next page, it goes to Finnish site.

    This code is from the archive.php that is used in both archives:

    f ( have_posts() ) : ?>

    <div class="posts-list width-medium margin-top-small">

    <?php while ( have_posts() ) {

    the_post();

    get_template_part( 'partials/post/post-item' );

    } ?>

    </div>

    <div class="pagination">

    <?php the_posts_pagination(

    array(

    'prev_text' => get_svg( 'pagination-arrow' ) . '<span class="screen-reader-text">' . esc_html__( 'Previous page', 'our-namespace' ) . '</span>',

    'next_text' => get_svg( 'pagination-arrow' ) . '<span class="screen-reader-text">' . esc_html__( 'Next page', 'our-namespace' ) . '</span>',

    'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'our-namespace' ) . ' </span>',

    )

    ); ?>

    </div>

    <?php else : ?>

    <p><?php esc_html_e( 'Unfortunately no posts were found', 'our-namespace' ); ?></p>

    <?php endif; ?>


    If I deactivate AI for SEO -plugin, everything works fine. Site uses Polylang to handle languages.

    Any solution to this?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Space Codes

    (@spacecodes)

    Hi there,

    thank you for your bug report. We tested the setup on our end using Custom Post Types and Polylang but couldn’t reproduce the issue. However, these steps may help narrow it down:

    1. Install and activate AI for SEO.
      Go to AI for SEO → Settings and click “Show advanced settings” (top right, if not already active).
      Then scroll down and set “Meta Tag Output Mode” to “Disable.”
      Make sure “Alt Text Injection” and “Image Title Injection” are both disabled as well.
      Save the settings, then try pagination again.
    2. Could you please tell us:
      a) What is your default language on the site?
      b) The exact URL where the issue occurs (e.g. the subpage where pagination breaks)?
      c) Are all CPTs affected or only a specific one?
      d) Are all languages affected (e.g. all redirect to Finnish when using pagination), or does this only happen on English archives?
      e) What are your Polylang settings?
      f) What are your CPT registration settings?

    If you prefer to provide these details privately, you can also email us at [email protected].

    Best regards,
    André Erbis
    AI for SEO

Viewing 1 replies (of 1 total)

The topic ‘Plugin breaks WP navigation’ is closed to new replies.