WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to pass argument from search-form to search.php (2 posts)

  1. maojiemng
    Member
    Posted 5 years ago #

    I have just finished search by category or categories!

    Now I want to show different search result style by different category search result. Such as I have two categories named music and news.

    search-result with music category: I want to show the thumb-image and title.

    search-result with news category : I want to show the title.

    so Now I need to pass a parameter from search-form to search.php , let search.php knows which category it search by and then search.php file will choose the Template to show search-result.

  2. maojiemng
    Member
    Posted 5 years ago #

    it's very simple ,ooooh my god!

    http://localhost/?s=piece&id=1
    $_GET['id']

Topic Closed

This topic has been closed to new replies.

About this Topic