Get Typecho Search Keywords

Source: Internet
Author: User
I want to customize the results of the search display, that is, search for specific keywords to display the results of the search, while displaying some of the specified content. I want to first get search keywords, should use what method?

Reply content:

I want to customize the results of the search display, that is, search for specific keywords to display the results of the search, while displaying some of the specified content. I want to first get search keywords, should use what method?

Can be used to $this->_keywords get the current search term

/usr/themes/default/archive.phpFile

'search' => _t('包含关键字 %s 的文章'),

archiveTitle(array( 'category' => _t('分类 %s 下的文章'), 'search' => _t('包含关键字 %s 的文章'), 'tag' => _t('标签 %s 下的文章'), 'author' => _t('%s 发布的文章') ), '', ''); ?>

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.