Forums Forums Search & Filter Pro How to get audio files to play in search results?

Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #246639

    Any idiot’s guide to get me on the road to playing audio files in the search results?
    These are audio files inserted into posts (or custom-posts) using some kind of media player.

    I don’t want perfection at this stage, just enough to see if the system would work fast enough — a bit like in the Search & Filter demo with all the movies in search results.

    Would be super-grateful for pointers to let me try this out.

    Trevor
    #246722

    We have no guide, sorry.

    You would first have to start with an archives page that has all the functionality, player etc, that you need, but no search. And then add the search functionality.

    The issue is how our plugin would attach itself to the query that makes your page, and, if your page uses javascript to add the player (most do, even the standard media player that ships with WordPress does), how to then reapply that when a search is made. I did recently show another user how to do the latter as they were using the standard WordPress media player and they coded the PHP template file themselves.

    Anonymous
    #246795
    This reply has been marked as private.
    Trevor
    #247122

    Do you actually have posts with the audio files inserted already in the content?

    If so, can you follow this setup for now:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    In particular, follow the instructions in the Customising section.

    That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.

    You need to find this line:

    <p><br /><?php the_excerpt(); ?></p>

    and replace it with something like:

    <p><?php echo get_the_content(); ?></p>

    You can edit pretty much anything in this file, but make small changes and test.

    Anonymous
    #250396

    Dear Trevor, a late thank you for this further support you’ve given me. I have kept hold of it while dealing with other things, and hope it will get me some steps further when I look into this again.
    Yes, I do have lots of custom posts,each with one audio file in the content, and that is what I want to make searchable, with the ability for the search results to show playable files.
    I now realise that on the plugin demo of movie files, you can’t actually play the movies from the results page, so that is a big difference in how I want results.
    Thank you for now.
    Eva

    Trevor
    #250398

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

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