Forums Forums Search & Filter Pro Dropdown Search for Title of Custom Post Types

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #220603

    Hi there,
    I created a custom post type and inside used ACF fields. In addition I associated a custom taxonomy.

    Now I would like to use this plugin to search for results in two ways:

    1. Search by custom taxonomy with dropdown (this is solved using taxonomy field) OR
    2. Search by title of the custom post type with dropdown (they are short names of people)

    It is important using a dropdown instead of simple text search.

    At the start I should see all the custom post types with ACF contents. And the search should display the results on the same page based on the user’s selections with dropdowns.

    Can you suggest me a solution?
    Thank you!

    Trevor
    #220620

    Are you able to send me a live link/URL to your search page so I can take a look?

    Anonymous
    #220635

    Hi Trevor, sorry, can’t send you a live link at the moment. Other options?
    Thank you!

    Trevor
    #220638

    You want a dropdown select box showing the titles of the posts?

    Anonymous
    #220666

    Yes I do Trevor, exactly. I think it could be done using an ACF field in which duplicating my title manually, but if there is a better solution I’m with you. Thank you!

    Trevor
    #220668

    That is what I would do, but I would add some code in the child theme functions.php file to hook in to the WordPress save_post() function to automatically copy the title across as posts are saved.

    Anonymous
    #220674

    Hi Trevor,
    could you explain shortly what is a code I can use in my case?
    Right now I’ve tried the ACF field and is ok.

    Thank you!

    Trevor
    #220776

    I do not have any examples/snippets for you, so you would need to rely on Internet sources, like this search should give you some ideas:

    https://www.google.com/search?q=stackexchange+wordpress+save_post+copy+post+title+to+custom+field&oq=stackexchange+wordpress+save_post+copy+post+title+to+custom+field

    Anonymous
    #225657

    Ok, thank you trevor

    Trevor
    #225681

    Thanks for getting back to me. I will close this thread for now.

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