Content of the page

Hook woof_redraw_elements_after_ajax


Content of the article

Allows to add any messages while user make filtrations in AJAX mode.

Example:

In example above user gets message if select any color in the filter. Demo see here - select any color. By this logic you can any commercial suggestions for the user while they use filtration.

Be attentive with:

  • $fields['.entry-title'] = ob_get_contents(); - by red is css class of the container where message should appear
  • $html = "<h1 class='entry-title'>Looks like you like the color:"; ... echo $html, "!</h1>"; - here is the message itself, and of course you can use using PHP switch display different messages for different content of the search requests

 

Faster WordPress Hosting