Support » Plugin: Search & Filter » Can this plugin be used with wordpress' images from media library?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DesignsAndCode

    (@designsandcode)

    Hi michelleadmin, this is a really non standard way to use WP so I decided some time ago not to support it because of all the potential problems I would get from people in support :/

    If you want to see if this works you could try allowing the “attachement” post type by removing lines 1196, 1197 and 1206 in search-filter.php.

    So the code should go from:

    if($post_type->name!="attachment")
    {
    	$tempobject = array();
    	$tempobject['term_id'] = $post_type->name;
    	$tempobject['cat_name'] = $post_type->labels->name;
    
    	$taxonomychildren[] = (object)$tempobject;
    
    	$post_types[] = $post_type->name;
    
    }

    to:

    $tempobject = array();
    $tempobject['term_id'] = $post_type->name;
    $tempobject['cat_name'] = $post_type->labels->name;
    
    $taxonomychildren[] = (object)$tempobject;
    
    $post_types[] = $post_type->name;

    Not sure it will work but you can try it 🙂

    Also you can try pass the attachment post type to your shortcode – something like:

    [searchandfilter fields="search,category" post_types="attachment"]

    Let me know if you manage to get it working 🙂

    Still didn’t work, it came up with no results. But thanks so much for the suggestion!! I’ll look around for different solutions.

    Plugin Author DesignsAndCode

    (@designsandcode)

    No problem thanks for checking out the plugin 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can this plugin be used with wordpress' images from media library?’ is closed to new replies.