Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro PostGrid display Search Result Title

Viewing 2 posts - 1 through 2 (of 2 total)
  • 6P Marketing
    #230561

    Hi,

    I used the 3rd party Post Grid layout and would like to display the Category Title on ajax display result.
    Can you help me with this? Thanks!

    Trevor Moderator
    #230616

    The Post Grid plugin itself controls the display of all content inside the Ajax Container on the results page, so our plugin has no control over this, and I know of no way to do as you want.

    You are able to control, within the WordPress editor system (or that of your theme) what appears outside of the Ajax Container (again, not something our plugin controls), but that content will not ‘see’ Ajax changing the results. You could use JavaScript to see the change, but that JavaScript would also need to somehow see find the new Category Title (presumably from the form).

    So, as long as there is a search form on the page, you could craft code to look in the form and grab and use the Category term in some way. The basic structure would look like this:

    (function ( $ ) {
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    	    console.log("ajax finish");
    	    // your code to fetch the new title and then change it on the page
    	});
    }(jQuery));

    If you place this code inline on the page (for example, in a Text widget – using the Text entry tab, not the visual tab), it must be inside HTML script tags.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.