This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Overlays on Top of Featured Image Previews

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Overlays on Top of Featured Image Previews Reply To: Overlays on Top of Featured Image Previews

#25135
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

The $r variable is basically the current result. I phrased it a bit incorrectly: It is within a loop of results, but not within the classing wordpress Loop, as these results can be mixed (users, taxonomy terms etc..). Within a classic wordpress “Loop” you can use functions like the_title() or the_content(), whereas here those won’t work here, as this is just a regular programmatical loop.
In the code above, I checked if the $r->post_type property exists, if so, then the current result is a post or post type, then the check proceeds runnig the has_term(..) function.