Site logo

[Support request] differentiate search layouts

Home Forums Support [Support request] differentiate search layouts

Home Forums Support differentiate search layouts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2521092
    aik

    good afternoon.

    I would like to create different layouts regarding the search.
    I have some custom posts [smartphones] I would like that when they search for smartphones the result has a different layout than that of the articles.

    if it were possible I would also like to differentiate the search based on tags

    #2521338
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to a smartphone search so i can see what it is doing today?
    and can you let me know what the layout change would be ?

    #2521429
    aik

    https://aikresource.it/?s=honor

    this is the link for the smartphone result

    it is already formatted, obviously for smartphone searches, but if you search for the title of an article, this is searched for using this format

    I would like to have 2 different results pages

    one for smartphones and one for articles

    #2522275
    David
    Staff
    Customer Support

    So how would that work ?
    Do you want a separate Search Form just for the smartphone custom posttype ? And where would that be on the site ?

    #2522314
    aik

    sorry for my english, this is my biggest limitation.

    I try to explain my request.

    https://i.ibb.co/pZ7S8CG/risposta.jpg

    in the theme i downloaded there was a module that was called for all archives and all searches. [selected in red]

    I changed the conditions by removing it from the search and setting it as an archive for articles only

    for this reason I created a new module (selected in blue) which is used to view the archive and search of smartphones, but this last module is set for all searches.

    I wish I could set the search forms based on the tip.

    example:

    module 1 : articles research, articles archive

    module 2
    smartphone search,
    smartphone archive

    I currently have custom archives set up for articles and smartphones but I can’t select custom search.

    is there a method?

    I hope I made myself clear

    #2522686
    Fernando
    Customer Support

    Hi Aik,

    Perhaps these articles could help:
    https://www.wpbeginner.com/wp-tutorials/how-to-create-advanced-search-form-in-wordpress-for-custom-post-types/
    https://imranhsayed.medium.com/create-custom-post-type-search-result-page-in-wordpress-fe56966dcce1

    Once you have your custom search for your smartphones, you can create a custom search template for them.

    1. Copy search.php into your child theme. Reference: https://github.com/tomusborne/generatepress/blob/master/search.php
    2. Rename it to search-YOUR-CUSTOM-POST-TYPE-SLUG.php
    3. Make any adjustments.

    Unfortunately, this level of customization would be out of our scope of support.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.