Different Types on multisite

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

 
Participant
1 year, 6 months ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #28079

    Participant

    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.

    #28083

    Hi,

    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 :)


    #28241

    Participant
    You cannot access this content.
    #28252
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28254

    Participant

    I have corrected the user.
    Thanks

    #28275

    Thank 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:
    – 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28276

    Participant

    Hello, 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?

    #28278

    This 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.
    In that case, you should be able to see the post types in the list as well, on all sites.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28279

    Participant

    Thanks, i test to activate the download Plugin Network width and generate a Serchbar on the Shop site wich include the Products and the downloads.

    #28280

    Participant

    It 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
    Till

    #28285

    Hi 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!

    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;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28287

    Participant

    It 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

    #28295
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #28300

    Participant
    You cannot access this content.
    #28304

    Those 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 :)


Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.