Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jon

    (@ghostwheelie)

    Hmm, so I managed to get this working by trying a hunch.

    Here is my paging code on my archive-news.php template:

    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    global $query_string;
    query_posts( $query_string . "&posts_per_page=3&paged=" . $page);

    I was basically setting the posts per page to 3 for this particular post type only.

    So on a hunch I went into Settings > Reading and changed the “Blog pages show at most” value down to 3, and suddenly paging worked for my custom post type.

    After playing around for a bit, it seems that WordPress is using the value in Settings > Reading on page load – meaning it looks for posts 11-20 for page 2 out of the box. Only after verifying that 20 or more posts exist does it run the custom paging query. I only have 7 news posts so far, so with the default settings, a page 2 did not exist.

    I ended up setting the “Blog pages show at most” down to 1 to ensure that all future attempts at paging custom post types would work, regardless of how many I wanted to show per page.

    Jon

    (@ghostwheelie)

    I just ran in to this issue when trying to change the permalink for a page.

    I believe I’ve got the plugin fixed. Since pages don’t get the geolocation functionality, I added an if condition around all the JS normally injected.

    I added the following after line 149 inside the admin_head() function in geolocation.php:

    if ($post->post_type == ‘post’) :

    Then added the corresponding endif; after all the JS (line 329). After making this change, I was able to add an image to and change the permalink of a page. I also tested posts, and the geolocation is working as expected.

    Hopefully the plugin author will get a fix integrated soon.

Viewing 2 replies - 1 through 2 (of 2 total)