WordPress.org

Support

Support » Themes and Templates » Pagination of a Custom Post type article not working

Pagination of a Custom Post type article not working

  • Please check out the following page:

    http://lakers.sonikastudios.com/gallery/sample-gallery-post-1/

    When you click on the page 2, 3 buttons, or the “next” button it does not work. It always loads up as page #1, and the URL resets.

    Here’s the code i put in the functions.php in order to get the custom post type, “gallery”, working.

    add_action( 'init', 'create_post_type' );
    	function create_post_type() {
    		register_post_type( 'gallery',
    			array(
    				'labels' => array(
    				'name' => __( 'Galleries' ),
    				'singular_name' => __( 'Gallery' )
    			),
    			'public' => true,
    			'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'comments')
    			)
    		);

    Next thing I did:

    1. I added a post under the “Gallery” topmenu under the admin section, with pagination done.
    2. I added a template file, gallery.php, and assigned it as a “Gallery” type of template.
    3. After that, when a gallery type post is opened, the page loads up fine.

    However my pagination still does not work, ONLY in the gallery post_type pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • By the way, I should add that my template uses the wp_link_pages() function within my template files, the proper way. And all other posts that are regular posts will still show the page skipping properly.

    Any ideas from anybody??? I’m not using any plugins that affect the way posts are displayed, and this is happening only in a certain post_type, which is what’s perplexing.

    Unbelievable.

    Is this where the downside of free open source software comes out? Does WordPress have a paid support option where I can get phone or email support with priority? This is a severe issue (potentially even a bug or lack of documentation) and yet I am getting nothing… My business often depends on the support I can get.

    I am willing to pay somebody for an answer, so if you want to fix this on a private basis please contact me by email.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pagination of a Custom Post type article not working’ is closed to new replies.
Skip to toolbar