There is a new way to get support - via the support tab in your account.
Our support systems are changing, for the better. You'll be able to manage all your support requests from your account, and respond to any tickets via email.
These support forums are now closed - existing tickets will be closed after a month.
Tagged: pdf attachments relevanssi
- Condrobs e.V.(Private) January 12, 2021 at 3:39 pm #272526
picking up on this, cause I want to do something similar: When I use the provided code for my form, the whole search only lists media. However I want to show all post types, but within media I only want to show pdfs. How to achieve this?Trevor Moderator(Private) January 12, 2021 at 4:43 pm #272554
I have referred this question to the plugin developer, Ross, for his input.
One issue with a search form such as the one you have made is that you have taxonomy fields in it. As taxonomies apply to one post type (or, they should not be shared across post types), when a taxonomy term is selected in the form includes rules, any posts from a post type that does have that taxonomy.
This type of limitation does not affect custom fields, which can be assigned to multiple post types.Ross Moderator(Private) January 14, 2021 at 1:24 pm #272779
So the first thing that would be good to know is, before you set the mime type, do you see the results correctly?
Ie, do you get a mixture of media + post types in the results? From what I can see on your link, you get all media, and after some pages, the posts too? So this part is working ok?
If that works, then the ext step would be to see if we can specify a mime type, and have it not exclude the other posts – but I’m not sure that would be possible.
ThanksCondrobs e.V.(Private) January 19, 2021 at 1:58 pm #273210
thanks for your answer:
Before setting mime type, I see all results. First it displays all media files, after that the pages come (page 9 I think).
-> Yes, it is a mixture of media + post types.
It would be amazing, if you could help me 🙂
PhilippRoss Moderator(Private) January 21, 2021 at 5:43 pm #273541
I’ve had a good go but unfortunately it’s not going to work.
Things work well until we set the mimetype, and because a regular post has no mime type it doesn’t work.
I’ve tried quite a few different options, but as soon as its set, the posts are excluded.
The only way I could think of, to do a search conditionally like that would be to use something like Advanced Custom Fields plugin.
You could add a custom field, to your media – https://www.advancedcustomfields.com/resources/adding-fields-media-attachments/
And mark all media you don’t want, with a checkbox to “exclude from search” or something similar.
Then you can use our
post metatab (in the search form settings), to exclude the posts with this custom field… leaving the remaining combination of images + posts.
Its not ideal I’m sure, but it’s the best I could come up with.
You must be logged in to reply to this topic.
These forums were the old support forums, and have now been reporposed as the community forums.
To get support, head to your account.