• I am trying to filter entries of a project CPT by its project_type taxonomy terms.

    Got the entries appearing via the shortcode:

    
    [ajax_load_more post_type="project" taxonomy="project_type" taxonomy_terms="art, buildings, commercial, illustrations, residential" scroll="false" transition="fade" posts_per_page="6" button_label="Load More"]
    

    For the filters list, here’s the HTML:

    
    <ul class="alm-filter-nav">
        <li><a href="#" data-post-type="project" data-taxonomy="project_type" data-taxonomy-terms="art, buildings, commercial, illustrations, residential">All</a></li>
        <li><a href="#" data-post-type="project" data-taxonomy="project_type" data-taxonomy-terms="art">Art</a></li>
        <li><a href="#" data-post-type="project" data-taxonomy="project_type" data-taxonomy-terms="buildings">Buildings</a></li>
        <li><a href="#" data-post-type="project" data-taxonomy="project_type" data-taxonomy-terms="commercial">Commercial</a></li>
        <li><a href="#" data-post-type="project" data-taxonomy="project_type" data-taxonomy-terms="illustrations">Illustrations</a></li>
        <li><a href="#" data-post-type="project" data-taxonomy="project_type" data-taxonomy-terms="residential">Residential</a></li>
    </ul>
    

    Enqueued alm.js with jQuery as a dependency.

    Full code in alm.js: https://pastebin.com/raw/ipJW8b2p.

    Note that I changed

    
    [].forEach.call(buttons, function (button) {
    

    to

    
    [].forEach.call(filter_buttons, function (button) {
    

    as I believe that’s how it should be plus was getting an error otherwise.

    Anyway, back to the main issue: Browser console shows this error: https://d.pr/i/EpuK82.

    Clicking on the filter buttons isn’t doing anything other than adding # to the page URL in the address bar.

    Please advise.

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Uncaught ReferenceError: almFilterComplete is not defined’ is closed to new replies.