WordPress.org

Forums

All in One SEO Pack
Pagination issues (6 posts)

  1. leemon
    Member
    Posted 1 year ago #

    Hi,

    I'm using the latest All in One SEO Pack plugin on a WP3.9 site I've developed. A static page showing a paginated list of custom post types is set as the front page.

    If I enable the "Enable Advanced Options" in the "Custom Post Type Settings" the pagination stops working (/page/n/ redirects to the main page).

    Am I the only one with this problem?

    https://wordpress.org/plugins/all-in-one-seo-pack/

  2. Hi leemon,

    We've not seen any other reports of this issue so it could be specific to the page template you have that displays custom post types on your homepage. Can you provide the URL for your site.

  3. leemon
    Member
    Posted 1 year ago #

    This is the code I use to loop through the custom post types on the front static page:

    $args = array('post_type' => 'book');
    $paged = (get_query_var('page')) ? get_query_var('page') : 1;
    $wp_query = new WP_Query( array_merge( $args, array('paged' => $paged) ) );
  4. Peter Baylies
    Member
    Plugin Author

    Posted 1 year ago #

    Hi leemon,

    Do you have Pages checked under "SEO on only these post types"? If not, check it and see if that makes a difference here. The static front page is still a page, so not doing SEO on pages could explain your issue.

  5. leemon
    Member
    Posted 1 year ago #

    I tried checking and unchecking the Pages checkbox under "SEO on only these post types" with no success. Pagination only works if I uncheck ALL the checkboxes under "SEO on only these post types".

  6. Peter Baylies
    Member
    Plugin Author

    Posted 1 year ago #

    Hi leemon,

    All in One SEO Pack does check the $paged global, so depending on when you change it, that might affect our pagination. We also call get_pagenum_link() and _wp_link_page() to get the links for the previous and next pages. It's all in aioseop_class.php in the wp_head() function.

    Also, unchecking all of the options there is equivalent to disabling SEO on all posts and pages and custom post types etc. including the static front page, as you'd expect. You can see that code in aioseop_class.php in the template_redirect() function.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All in One SEO Pack
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic