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

#20156
Michael SamsonMichael Samson
Participant

Hi Ernest,

Thank you again for working on this filter. The custom names for the taxonomy content-types are working perfectly, but unfortunately you went in the wrong direction for what I needed on limiting the length of the titles.

I spent a lot of time integrating in your changes, but when I tested them I discovered you had misunderstood what I needed. The length limits you added only apply to the custom lines we have added to the title (like the content type and post format). I didn’t need or want to limit those lines at all.

What I need to limit is the total length of the normal titles… not the extra lines that we added. This is really a problem for post titles in particular, but the solution can apply to all the content types.

This is what the HTML structure of a search result titles currently looks like:

I’ve tried multiple times to paste this in here as code and it doesn’t work. I’m replacing the normal brackets with parenthesis so this displays.

[h3]
[a class=”asp_res_url” href=”https://”%5D
“This is the title that we must abridge…”
[br]
[span class=”content_type”]Shares[/span]
[br]
[span class=”post_format”]Article Format[/span]
[/a]
[/h3]

The length limit you added is applying to the content_type and post_format spans above. I don’t want to limit these lines at all. What I need to limit is the total length of the original title which you see above in quotes. The other issue here is that I need to limit the total length of the title and not worry about the lines. It makes no sense to limit individual lines since the title wraps from line to line. I simply need to specify a maximum word count for these titles. This will work a lot better with a word count than a character count. But either way it cannot be a per-line maximum. The maximum must apply to the title as a whole, counting from the start of the title. This way I can limit long post titles that do not otherwise fit in the search result cards.

It really doesn’t make any sense to leave in the character count limits you just did. I do not want to limit those lines at all. So we should take this out completely. I only want to limit the main title as described above.

I’m sorry to ask more of you here. I really was hoping we had it right this time. I didn’t even realize this was implemented incorrectly until I went to test it.

This is the only remaining issue at this point. Perhaps one good way to approach this would be to surround the main title with a span and class, and then target it specifically. This makes sense since the other custom parts of the titles have their own classes.

Hopefully this all makes sense. I feel badly asking more of you… but we are so close with this!

~ Michael