Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Different Types on multisite
This topic contains 19 replies, has 2 voices, and was last updated by till.kemper61 2 years, 11 months ago.
- AuthorPosts
- June 25, 2020 at 9:49 am #28079
Hello, we have the problem, that we have a wordpress multisite, we would search at all Blogs, but we only can choose the post types wich is selcected, we would serach for Products at shop.njf.de and downloads at archiv.njf.de. I cant choose all types i want.
June 25, 2020 at 12:05 pm #28083Hi,
Can you please add temporary back-end and FTP access details? I will check out the issue directly, as well as do a few lines of debugging. Thank you!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 3, 2020 at 2:05 pm #28241You cannot access this content.July 6, 2020 at 8:30 am #28252You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 6, 2020 at 8:34 am #28254I have corrected the user.
ThanksJuly 7, 2020 at 10:27 am #28275Thank you very much, I was able to debug now.
I investigated the underlying problem, and found out that in wordpress there is no way to access all custom post types across the network. This makes it a bit more difficult, and it looks like there is no way to bypass this either.
I believe the best and easiest solution would be:
Best,
– Create 2 search bars – one for the shop, one for the downloads
– Configure the first on the shop multisite
– Configure the second on the site where the downloads are enabled
In that case, the desired post types should be available.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 7, 2020 at 10:31 am #28276Hello, thank you, but this solution is not possible, because we are want serach to all Subdomains on the Mainpage. (njf.de) So when i only can search for things on the Mainpage with include downloads or with include products.
Is it possible to conntect the Data of 2 Search Bars to 1 Search Bar?
July 7, 2020 at 10:33 am #28278This would only work, if the woocommerce (or other store) and the download plugins are network activated – otherwise they are not accessible across sites, WordPress does not allow that unfortunately.
Best,
In that case, you should be able to see the post types in the list as well, on all sites.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 7, 2020 at 10:36 am #28279Thanks, i test to activate the download Plugin Network width and generate a Serchbar on the Shop site wich include the Products and the downloads.
July 7, 2020 at 10:43 am #28280It ist working.
Is it possible to shown the PDF Logo in the Search bar bevor the document Title? like on https://archiv.njf.de/downloads/?
Kind Regards
TillJuly 7, 2020 at 3:06 pm #28285Hi Till,
Well, not possible via settings, but it might be possible via custom coding. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
Best,add_filter( 'asp_results', 'asp_attachment_image_custom', 10, 1 ); function asp_attachment_image_custom( $results ) { // Parse through each result item foreach ($results as $k=>&$r) { // PDF custom image if ( isset($r->post_mime_type) && strpos(strtolower($r->post_mime_type), 'pdf') !== false ) { $r->image = 'https://archiv.njf.de/wp-content/plugins/download-manager/assets/file-type-icons/pdf.svg'; } } return $results; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 7, 2020 at 3:55 pm #28287It is not working, i put in this code to my /wp_njf_multisite/wp-content/themes/Avada/functions.php but noting is happening in the frontend.
/*PDF Logo in Search*/ add_filter( 'asp_results', 'asp_attachment_image_custom', 10, 1 ); function asp_attachment_image_custom( $results ) { // Parse through each result item foreach ($results as $k=>&$r) { // PDF custom image if ( isset($r->post_mime_type) && strpos(strtolower($r->post_mime_type), 'pdf') !== false ) { $r->image = 'https://media.njf.de/2020/07/pdf.png'; } } return $results; }
If you will probatly test it i have actualisate the ftp entry
July 8, 2020 at 9:45 am #28295You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 8, 2020 at 10:25 am #28300You cannot access this content.July 8, 2020 at 12:21 pm #28304Those are post types I assume? I cannot tell without back-end access. If the icon is not within the content or as featured image, the plugin cannot parse that. If this is a custom post type, then there is probably some sort of an API with the downloads plugin, that might be able to return the icon image. Let me know if you know how to do that, and I will help to integrate.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.