Support » Plugin: WordPress Download Manager » Remove Downloads from WordPress search results

  • Resolved dyba03

    (@dyba03)


    Hi, how can I remove download packages from the default wordpress search results?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Need some code edit in download-manger > download-manger.php, in line number 207,
    'exclude_from_search' => (bool)get_option('__wpdm_exclude_from_search', false) replace false to true. it will help you.

    Thanks.

    and you can also use this code in your theme functions.php for a permanent solution.

    add_action( 'init', 'wpdm_custom_type', 99 );
    function wpdm_custom_type() {
        global $wp_post_types;
        if ( post_type_exists( 'wpdmpro' ) ) {
            $wp_post_types['wpdmpro']->exclude_from_search = true;
        }
    }

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.