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

Reply To: Questions Regarding Advanced Title Fields

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Questions Regarding Advanced Title Fields Reply To: Questions Regarding Advanced Title Fields

#19979
Michael SamsonMichael Samson
Participant

Hi Ernest,

I left this for the end of my work day because I knew it was going to be fun, and it sure was! I haven’t been this excited about the search in a long time. I was able to combine your code above with some targeted styling changes and it made an amazing difference to the search results. Thank you so much for providing this. You my friend are a genius! =)

All of your code is working beautifully. I only wrote down a few things to ask about…

1. This was the one bug in the code. For the code that returns the content type it is displaying the “post_page_cpt” instead of the “attachments.” The attachment search works just fine, but it is simply saying the incorrect content type below it. I wonder if this is issue is related to the code we use to forward attachment results to their parent post?

2. For the content type, is there any way to separate the categories and tags into separate types? This issue has actually come up before in the content type filters. I’ve been wanting to separate the filters for categories and tags, but you told me a long time ago this wasn’t possible. Do you still think that’s the case? Now that I think about it the content type displayed in the title should really match the content type in the filter options. Right now we call this “Categories & Subcategories,” but it would be great to be able to separate these into two types.

3. For the custom field code on the member results, I’m using an xProfile field. However, I did try the last active option as well. I noticed that this displayed an actual date and time which wasn’t really user friendly. Usually in BuddyPress it displays the last active time in a more readable format like, 1 day ago, or 1 day three hours ago, etc. Would it be possible to get this to display the last active info the same way BuddyPress does it?

4. I don’t know why I didn’t notice this before, but there doesn’t seem to be a content type filter options for post comments. I really didn’t take notice of the post comments showing up in search until today. This could be useful for us, but I’d like to have it be a content type filter (since it is a content type). I noticed you had this as one of the options in the content type title code, so I looked for it in the search results. The title is working perfectly, but there’s just no content type filter available for it. (See my update below under #5, as it is related to this)

5. It turns out that the comments search results are showing up in the results even if I select only one content type filter. As mentioned in #4 there isn’t a content type filter available for the comments. I just found that if I filter the content type to only display one type it is mixing in the comments.

UPDATE:
Ok, I see you can turn off “Search in Comments” from the Search Settings. This prevents the comments from showing up in search results. I think what is confusing here is that the comments now have a content type title, but you can’t filter them under the content type filters. Instead that is under the search settings area. It’s a little counter-intuitive. To be able to search in the comments (as the option says) means to return a search result that is a comment. Anyway, you can see why I missed this at first. Perhaps this makes more sense to be under a content type filter? Just thinking out loud here.

6. I modified your code in both scripts slightly to add in a <span> with a css class. It’s working perfectly, but I wanted to run it by you. I’m never 100% sure about those periods in the code for separating strings.

This is what I have:
$r->title .= ‘<br><span class=”content_type”>’ . $content_types[$r->g_content_type] . ‘</span>’;

7. Very small thing I just noticed while trying to change the term “Filter by Categories” to “Filter by Category” in the search settings. It seems there are no label options for either filter by format or filter by categories. I noticed that the only filter label that was plural was categories, so I tried to change it, and then saw there was no label option for it.

…..

As for the original thread, yes, there are some things left in there still. I really need to review what is still a problem to let you know. I can tell you that the problem with the cards shrinking on subsequent searches is still occurring. That’s probably the most annoying issue. I’ll get back to you on that thread when I have some time.

You’ve been so amazingly supportive in the customization of this plugin. I can’t tell you how much I appreciate it! The search looks incredible in the site, and these latest changes just took it up another notch. Thank you so much! =)

~ Michael