Support » Plugin: WordPress Infinite Scroll - Ajax Load More » Use my own classes with shortcode?

  • Resolved chrisgot


    Hi, thoroughly enjoying ALM and no issues whatsoever. I have only one inquiry if there is anything like a shortcode filter planned for ALM? See the Related posts by taxonomy plugin for an example –

    More precisely I would like to change the class and id names of the two divs output by the ALM shortcode to something that suits my own css class naming.

    <div id="ajax-load-more" class="ajax-load-more-wrap white paging-purple alm-0" data-id="0">
    <div class="alm-listing alm-preloaded " data-total-posts="3">


    <div id="my-id" class="my-class another-class etc" data-id="0">
    <div class="some-class etc" data-total-posts="3">

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


    I don’t have any plans to add filters for adjusting class/ids because the core JS requires the ajax load more classes.

    I do provide ways to add custom classes to the container though – Did you see that in the shortcode builder?

    There are 3 unadvertised filters that are in the latest release.

    - alm_before_container
    - alm_before_button
    - alm_after_container
    function alm_before_container() {
       $content = '<div class="pre_alm"><h2>These are my posts!</h2></div><hr/>';
       return $content;
    add_filter( 'alm_before_container', 'alm_before_container' );

    That is helpful Darren, thanks!
    I am getting the hang of it now, nice!

    Btw, when saving the plugin settings by clicking the save settings button, the wheel spins next to it and the page reloads in the browser the non-ajax way. I am not sure it was like that before. Settings are updated though, no problems.

    Plugin Author dcooney


    Hey Chris,
    Yea that’s the correct functionality… I just add the spinner to let you know something is happening 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use my own classes with shortcode?’ is closed to new replies.