• 1. Can I create two search forms?
    I don’t mean to put the search form in 2 places, but I want to make 2 searches with different settings.
    2. Can I put the search form on the category and tag pages? And the search form in categories and tags page only searching for articles in that taxonomy.
    Can it?

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter Mushlih Almubarak

    (@mushlih)

    $taxonomies = 'category, post_tag, product_cat'; // Enter the taxonomy names here

    Hi
    Can I set the taxonomy automatically without writing it down manually one by one? Because I have a lot of tags
    Maybe I can use the get_taxonomy function?
    thank you

    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    It gets the terms from a given taxonomy automatically – you only need to write the taxonomy names. For exampe “post_tag” will retrieve the current tag from the archive page and restrict the results to that. It will work for all the tags.

    Best,
    Ernest M.

    Thread Starter Mushlih Almubarak

    (@mushlih)

    That means I don’t need to change anything from your code? And can I add the post_author to that code?

    Plugin Author wpdreams

    (@wpdreams)

    Well if you have a taxonomy named post_author, then you can add it to the list:

    $taxonomies = 'category, post_tag, product_cat, post_author';

    But if you mean the post author – like the user name or nickname, then that is not a taxonomy, it will not work there.

    Thread Starter Mushlih Almubarak

    (@mushlih)

    But if you mean the post author

    Yes, what I mean is that thing.
    If so, is there a way to make the search form on the author page only search for posts written by that author?
    Thank you

    Plugin Author wpdreams

    (@wpdreams)

    I’m afraid that is not possible with that custom code.

    Thread Starter Mushlih Almubarak

    (@mushlih)

    Then, do you have other code so that the search form only searching for articles on that author?
    Beforehand I was thankful that your code was working after I uploaded it to hosting

    Plugin Author wpdreams

    (@wpdreams)

    Unfortuantely I don’t have a custom code for that, I am sorry.

    Best,
    Ernest M.

    Thread Starter Mushlih Almubarak

    (@mushlih)

    Ok, thank you very much

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Some Question’ is closed to new replies.