• Resolved monitor

    (@oomskaap)


    I like the plugin but I can’t use it unfortunately.
    It is very strange to me that you develop a plugin which does not work with the WordPress categories template?

    If I am browsing the category “Apples” and i want to load more posts:
    I place this in my categories.php page:

    <?php echo do_shortcode(‘[ajax_load_more posts_per_page=”100″ transition=”fade” button_label=”Older Posts”]’); ?>

    Your short-code will load site-wide posts, not related to “Apples” category at all. It just loads the latest post no matter which category.
    I cannot hard code a category there because it is the dynamic WordPress category page.

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

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

    (@dcooney)

    There is an Examples (/wp-admin/admin.php?page=ajax-load-more-examples) page built right into the WordPress plugin that provides the EXACT script needed to achieve your results.

    <?php
    $cat = get_category( get_query_var( 'cat' ) );
    $category = $cat->slug;
    echo do_shortcode('[ajax_load_more category="'.$category.'"]');
    ?>

    Hey could you help me? I’ve set the “cat” page up with this code below and it worked like a charm for me:

    <?php
    $cat = get_category( get_query_var( ‘cat’ ) );
    $category = $cat->slug;
    echo do_shortcode(‘[ajax_load_more category=”‘.$category.'” offset=”6″ posts_per_page=”6″ pause=”true”]’);
    ?>

    Ok so how would i do this for the search page to show more results after the first 6 results? I only have the search page to do and im 100% up and running.

    Thanks great plugin!!!

    Sorry My (CATEGORY & TAGs) use archive.php to display there results i think as i dont have a tag.php. How would i make these separate codes work together on the archive.php? They all work on there own.

    If i add multiple codes eg raw tag code and the raw category code i will get 2 buttons at the bottom due to 2 seperate codes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category pages’ is closed to new replies.