• Resolved Damiano Righetti

    (@suracreat)


    Hello there,
    not sure if it was already asked, would it be possible to add a last dropdown-select for all the result-posts (instead of linking to the archive list) and selecting one, it links directly to the single-post page?

    or if i want to code this on my own, where should i start?

    Thanks in advance
    Have a nice day!

Viewing 1 replies (of 1 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi!

    Sorry this topic went unnoticed by me!

    There’s no current way to do this in BTF itself.
    I think it’d require quite a bit of coding to do.. But if you want to do it here’s how I think in theory it could work:
    * Remove the BTF filter button (use CSS, it’s easiest).
    * Write your own piece of JS which triggers whenever a user changes their dropdown value.
    * The JS picks up the users selected values in all dropdowns and passes them to an AJAX function.
    * In the AJAX function you do a WP_Query with a tax_query based on the values for the taxonomies you passed.
    * Return the results from the WP_Query to your JS.
    * Fill a new select with the results. One <option> element per post where the value should be the posts permalink.
    * Add some more JS which performs a JS redirect whenever one chooses a post in the new select you filled.
    * Done! Go grab a coffee (or something stronger).

    Hope that helps you get started in case you want to do this.
    I think the use case is far too specific to consider it for BTF core.

    Best of luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to add a last dropdown to select a specific post’ is closed to new replies.