• Hi,

    We suddenly have an issues where the category posts on our category page are no longer being loaded. It was working previously, however it has stopped after some minor header.php mods.

    It appears to not be able to pull the posts from the DB.
    here is the shortcode:

    <?php echo do_shortcode('[ajax_load_more post_type="post" category="'.$current_cat.'" repeater="default" posts_per_page="15" scroll="false" transition="fade" button_label="'.__('View More Articles','twentyfourteen').'" ]');?>

    The declaration of $current_cat:

    if (is_category( )) {
      $cat = get_query_var('cat');
      $yourcat = get_category ($cat);
      $current_cat =  $yourcat->slug;
     }

    https://www.ads-software.com/plugins/ajax-load-more/

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

    (@dcooney)

    Does that return the correct category?

    How about when you use the example on the plugin > examples page?

    $cat = get_category( get_query_var( 'cat' ) );
    $category = $cat->slug;
Viewing 1 replies (of 1 total)
  • The topic ‘Nothing Loads But Show More Button’ is closed to new replies.