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

#20130
Ernest MarcinkoErnest Marcinko
Keymaster

Hi Michael,

Content type/Taxonomy titles
Okay, I think I understand it now. You want to display your own taxonomy labels, instead of the ones that WordPress returns within the code.
I have made a change to the code, there is an additional variable $taxonomies, where you can define taxonomy -> label key pairs. It works the same way as the other ones, where a key pair is found, the custom label is used.

Notes
a. Thank you, fixed
b. There was an actual option a long time ago to limit titles, but it caused so many issues – some plugins used shortcodes, tags etc.. on title outputs, and it was a nightmare to manage that, as the visual length and the code length were different.
Your case is a great example, since there are HTML tags in the final title. So visual title does not equal to the actual title. I resolved this, by implementing two new variables $title_limit_per_line and $title_limit_suffix. The length limitation is applied per line, before the HTML tags are appended, so that the characters can be counted properly.
Please mind that it uses character count, not word count – but it will still cut the string at word endings, as I used a built-in method for that, not a simple string cutting method. The title $title_limit_suffix string is printed after each line, where the title was cut.