Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Change 'is_singular()' to 'is_single()' to allow script to load for custom post type archives #354

Merged
merged 1 commit into from

2 participants

@proudfoot

Hi-

The big rewrite a couple of revisions ago caused the Wordpress plugin to stop functioning for custom post type archives and in my case at least for a custom query on a custom post type.

This is caused by 'is_singular' being used at the bottom of 'infinite-scroll/infinite-scroll.php' to check for single page views.

Replacing this with 'is_single' restores functionality for custom post type archives and with the custom query I am using.

@proudfoot proudfoot Update infinite-scroll.php
Change 'is_singular()' to 'is_single()' to allow script to load for custom post type archives
05c14a3
@67726e 67726e merged commit d8fd9a0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 12, 2013
  1. @proudfoot

    Update infinite-scroll.php

    proudfoot authored
    Change 'is_singular()' to 'is_single()' to allow script to load for custom post type archives
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  wordpress-plugin/infinite-scroll.php
View
2  wordpress-plugin/infinite-scroll.php
@@ -304,7 +304,7 @@ function paged_404_fix( ) {
*/
function shouldLoadJavascript() {
// Don't need to load the plugin on single pages
- $load = is_singular() ? false : true;
+ $load = is_single() ? false : true;
return apply_filters( 'infinite_scroll_load_javascript', $load );
}
}
Something went wrong with that request. Please try again.