• Resolved marselgray

    (@marselgray)


    Greetings,

    I am attempting to fix a bug that does not allow most posts to load whenever the author ID is put into the shortcode. If I remove it, I can load all posts so I’, thinking it has something to do with this part. I’ve read the documentation and even attempted to do a replicate through the plugin with no better result. Any help is appreciated.

    Things I’ve ruled out:
    -the author does have more posts to load
    -the button will load more posts if no author ID is placed in
    -plugin interference

    $author = get_the_author_meta(‘ID’);
    $ajax_load_more_attr .= ‘ author=”‘ . $author . ‘”‘;
    echo do_shortcode( ‘[ajax_load_more id=”authpost” theme_repeater=”authpost.php” posts_per_page=”6″ post_type=”post” scroll=”false” pause=”true” button_label=”LOAD MORE”‘ . $ajax_load_more_attr . ‘]’ );

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @marselgray,
    Do you still require assistance with this?

    I checked out the link you sent, but it appeared to be working for Robert Bradley articles…. let me know if its not and I can investigate more.

    Thread Starter marselgray

    (@marselgray)

    Apologizes. We got it working by reverting to an older version of the Co-Authers plugin. The problem is apparently deeper than we first realized and actually appears to be an issue with the core WP_Query “where” filter, which does affect data queried by Ajax Load More but would also affect anything / everything else using WP_Query, which would include simple template loops and more. Specifically, the problem is that some string substitution appears to mangle the SQL query string, inserting a separate where clause directly into the middle of a table name in another clause.

    Plugin Author Darren Cooney

    (@dcooney)

    @marselgray Ah yes, I’ve had weird issue arise with Co-Authors in the past. I was not able to solve it.

    Thread Starter marselgray

    (@marselgray)

    We were able to solve it by restoring the co-author plugin to version 3.2.2. There are no none security issues since this version and for us it worked.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t Load More Posts when Author ID is put into Shortcode’ is closed to new replies.