Adding Ajax Load More to archive.php
-
Hi there,
I’m trying to add the plugin Ajax Load More to the archive page, but I’m not sure how to do it.
I’m tweaking the child theme. I copied the archive.php from the main theme and modified following this example:
https://connekthq.com/plugins/ajax-load-more/docs/code-samples/category-archives/I added the code here:
<?php teletype_pagination(); else : get_template_part( 'template-parts/content', 'none' ); $cat = get_query_var('cat'); $category = get_category ($cat); echo '<h1>'.$category->cat_name.'</h1>'; echo do_shortcode('[ajax_load_more category="'.$category->slug.'" cache="true" cache_id="cache-'.$category->slug.'"]'); endif; ?> </section><!-- #blog --> </main><!-- #main --> </div><!-- #primary --> <?php get_footer();
But is not working.
Any hints?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding Ajax Load More to archive.php’ is closed to new replies.