Continue reading MemberPress Downloads add-on

MemberPress Downloads add-on

The Downloads add-on for MemberPress adds downloadable files to MemberPress. These files are stored outside the Media Library, so by default Relevanssi attachment indexing has no access to them. However, Relevanssi offers filter hooks you can use to make Relevanssi index the MemberPress Downloads files. Adjust the query First, we need to tell Relevanssi to…

Read more MemberPress Downloads add-on 0 Comment on MemberPress Downloads add-on
Continue reading WP Download Manager

WP Download Manager

…filter hooks that make it possible to access WP Download Manager files. Changing the attachment query The first one we need is relevanssi_get_attachment_posts_query, which is used to fetch the attachment posts for indexing. By default, Relevanssi looks for posts with the post type attachment, post status inherit and a suitable……MIME type. These all need to be changed, because the WP Download Manager posts have the post type wpdmpro, status of publish and no MIME type. The necessary filter function looks like this: add_filter( ‘relevanssi_get_attachment_posts_query’, ‘rlv_wpdmpro_query’ ); function rlv_wpdmpro_query( $query ) { return str_replace( “post_type = ‘attachment’ AND post_status =……these issues. When you upload the files to the Relevanssi attachment reading server, Relevanssi uses the get_attached_file() function to get the file name, but that does not work with WP Download Manager. Thus we need to use the relevanssi_get_attached_file filter hook to provide the file name and path for Relevanssi….

Read more WP Download Manager 0 Comment on WP Download Manager