WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
Pagination issues (6 posts)

  1. leemon
    Member
    Posted 3 months 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. wpsmort
    Member
    Posted 3 months ago #

    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 3 months 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 3 months 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 3 months 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 3 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic