Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1090450

    Hi,
    If I enter a search Item that will find an item that is a download item and select it from the search results pull down, clicking on it will not work.

    In more detail a example that reproduces the issue on our site:
    Enter “Weih” into the search field and wait until a list appears. (Do NOT press on the magnifyer class !)
    Go down with the mouse and click on “Weihnachtspfarrbrief 18”
    This wants to bring you to the link https://www.my.url/?post_type=dlm_download&p=3538.
    But this does not work.
    (Searching for pages/blogs with the same method will work.)
    However pressing on the Magnifying class first will list the search results and going there to the same item
    will bring you to https://www.my.url/download/3538 -and this will work.

    br
    Wolfgang

    • This topic was modified 1 year, 6 months ago by  sthubertus.
    #1091257

    Hey sthubertus,

    Thank you for using Enfold.

    We are not sure how dlm handles links, so it’s probably best if the “downloads” post type or items are excluded from the AJAX search.

    add_filter('avf_ajax_search_query', 'avf_ajax_search_query_mod', 10, 1);
    function avf_ajax_search_query_mod( $search_parameters )
    {
    	$footer = avia_get_option( 'footer_page', 0 );
    	$defaults = array('numberposts' => 5, 'post_type' => array( 'post', 'page', 'product' ), 'post__not_in' => array($footer), 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false);
    	$_REQUEST['s'] = apply_filters( 'get_search_query', $_REQUEST['s']);
    	$search_parameters = array_merge( $defaults, $_REQUEST );
    	return $search_parameters;
    }

    Best regards,
    Ismael

    #1092755

    Dear Ismael,

    Thanks, this workaround works!

    Happy Easter
    Wolfgang

    #1092906

    Hi Wolfgang,

    Great, I’m glad to hear that Ismael could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Happy easter to you too :-)

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.