Giter VIP home page Giter VIP logo

wordpress-ajax-filter-posts's People

Contributors

ians88 avatar lud avatar robbertdk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wordpress-ajax-filter-posts's Issues

Post status

Hi, is it possible to add the post_status in query args ?
Thanks for your answer !

Trigger filter selection with hash url

Hi, it's me again :)

I wanted to use url to select a filter when opening the page with the hash.
Ex: when accessing to https://my-website.com/#filter=apple, the ajax filter for "apple" would be automatically applied.

I almost managed to do it, except that, after loading the page through the url hash, when I clicked from one filter to another the ajax requests were duplicated, so the results were not good, I couldn't figured out why.

I don't have time to look into it anymore but I think it could be a good feature !

Load more

How can we load more data ON SCROLL by disabling: on(container, 'click', '.js-load-more', function(event) {
Thank you

See all terms even if there is no product linked to one of them

Hi,

this is not really an issue but, I wanted to know if it's possible to display all terms even if there is 0 product in one of them.
Currently, if a term is not "linked" with any product, it does not appear in my filter.

Can you tell me if there is a way to do this ? (I couldn't find a hook or something to do this).

Thanks,
Quentin

Clear button

Hi,

Thank you for this really nice plugin. I was wondering myself if there was a way to add a "Clear" button which would reset all applied filters ?

Thanks a lot,
David

JSON Parse error

UPDATE
This issue was due to Polylang plugin, after deactivate it, everything worked correctly. I tried Loco Translate and everything seems ok now.

Hi,
I just found your awesome plugin and tried it but there is a JSON parse error when trying to load more or filter my posts.

Here the console log error :

Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.request.onload (ajax-filter-posts.js?ver=4.9.6:200)

I changed the line 188 in ajax-filter-posts.js :
request.setRequestHeader("Content-Type", "text/plain");

It seems to be working, but I'm not sure if it's ok and secondly, a load more or filter request now return a 400 Bad Request error:

POST http://skald/wp-admin/admin-ajax.php 400 (Bad Request)

getAJAXPosts @ ajax-filter-posts.js?ver=4.9.6:230
handleFilterEvent @ ajax-filter-posts.js?ver=4.9.6:84
(anonymous) @ ajax-filter-posts.js?ver=4.9.6:24
(anonymous) @ ajax-filter-posts.js?ver=4.9.6:264
ajax-filter-posts.js?ver=4.9.6:193

0

I don't know if you're still updating this plugin, but is there a way to help me with that ?

Thanks.

Accessibillity could be better

  1. Convert the filter list to form elements, because in essence, that is what they are.
  2. Add ARIA live region to announce filter updates
  3. Add rel="next" to the load more button

meta key

could you show an example of adding to the filter meta key value?
e.g. input price and posts are filtered with an exact match value price

Issue loading posts

First off, thank you for creating this plugin- it looks to do exactly what I need for a current project. I'm experiencing an issue with the posts not loading, however, when clicking on filters. On my template page, using the shortcode, I can see the filters and posts rendered on the page, but when I click on one of the terms to filter posts, it just hangs with the animation and I see in the console:

Failed to load resource: the server responded with a status of 500 (Internal Server Error) ajax-filter-posts.js?ver=4.8:193 (index):1 Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at XMLHttpRequest.request.onload (ajax-filter-posts.js?ver=4.8:200)

Do you know what might be happening here?

Hook to override template

Hello,

I’m using Oxygen Builder who removes WP template system so I'd like to overwrite templates with a custom plugin (like that https://wpdevdesign.com/how-to-override-woocommerce-templates-using-a-custom-functionality-plugin/ ).

I don't think there is a hook to do that in your plugin, but some plugins give us the possibility to do that like woocommerce :

https://github.com/woocommerce/woocommerce/blob/77917a2de31d76f90b4380815a48b4efcef543a8/plugins/woocommerce/includes/wc-core-functions.php#L289

Is it possible to implement a hook like that ?

Thanks

Remove opinionated styling: more focus on the core concept of this plugin AJAX fetching and filtering

This plugin includes a lot of specific styling. Although it's easy to remove the styling, I like a more bare bones approach. The idea of this plugin is that it would be easy for theme authors to add an ajax filter and pagination functionality to the theme without the hassle of setting up the AJAX fetching and the filtering, not providing a fully designed filter plugin.

From that point of view the styling is redundant and anoying.

Initiate the plugin without the use of a shortcode

When you want to use this plugin directly in your theme files you have to write something like <?php echo do_shortcode('[ajax_filter_posts post_type="posts" tax="post_category," posts_per_page="16"]', false ); ?> It would be nice if you can initiate as a function, something like

<?php echo ajax_filter_posts([
   'post_type' => 'posts',
   'taxonomy' => 'post_category',
   'posts_per_page' => 16,
]); ?>

Or maybe even break it up into several shortcodes and functions, as Facet WP does.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.