Title Lenght in search results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Title Lenght in search results

This topic contains 2 replies, has 2 voices, and was last updated by sergio00 sergio00 10 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1338
    sergio00
    sergio00
    Participant

    WordPRess Dreams Support

    I pourchased the Ajax Search Pro for WordPress yesterday from Codecayon.

    I just want to know how to change the Title Lenght of the search results.

    The results show me the 15 first characters of the title name of the posts, and them “…” How can change it to for example 20 characters after the “…” appears??

    Thanks for the support
    Best Regars from Spain
    Sergio

    • This topic was modified 10 years, 5 months ago by sergio00 sergio00.
    Attachments:
    You must be logged in to view attached files.
    #1344
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Sergio!

    I’m guessing you are searching post comments 🙂 It’s only possible to change by modifiing the source code, but you only need to edit 1 line.

    If you have ftp access, then open up this file: wp-content/plugins/ajax-search-pro/includes/search_comments.class.php and go to line 70, you should see this:

    $commentsresults[$k]->title = substr($commentsresults[$k]->content, 0, 15)."...";

    If you want to change it to 20 characters, then replace that line with this:

    $commentsresults[$k]->title = substr($commentsresults[$k]->content, 0, 20)."...";

    Let me know if it helped or you need any assistance with this!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #1365
    sergio00
    sergio00
    Participant

    Exactly!
    Work Perfect!
    Thanks for the fast support!

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

You must be logged in to reply to this topic.