Support » Plugins and Hacks » Enhanced Media Library » [Resolved] Seach by tags

[Resolved] Seach by tags

Viewing 1 replies (of 1 total)
  • Plugin Author webbistro


    Hello @bassieb,

    I am very sorry for my silence for so long time.

    To solve this add following code to your functions.php

    add_action( 'pre_get_posts', 'custom_pre_get_posts' );
    function custom_pre_get_posts( $query )
    	if ( $query->is_main_query() && is_tag() && !is_admin() )
    		$query->set( 'post_type', 'attachment' );
    		$query->set( 'post_status', 'inherit' );

    Don’t forget to renew Settings -> Permalinks


Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Seach by tags’ is closed to new replies.
Skip to toolbar