Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1030394

    Hi,
    I installed the plugin “Download Monitor”, because we want to use Enfold as the design for a extranet page with internal downloads.
    The search function works with the pages and download items, but the search result shows the wrong download URL in the search result drop down (main navigation). The URL on the search result page is right. Is it possible to set the right URL in the drop down?
    Please see the screenshots in the private content.
    Bests,
    Andy

    #1031097

    Hey Andy,

    Thank you for using Enfold.

    You can use the “av_custom_url” to change the search items’ url.

    add_filter( "av_custom_url", function( $link, $post ) {
       // do something here
       return $link;
    }, 10, 2 );
    

    Best regards,
    Ismael

    #1031171

    Hi Ismael,
    Thanks, but I don’t know what should I Do with this snippet.
    Please explain.
    Bests,
    Andy

    #1031520

    Hey!

    That filter returns the link of the search result item. You can use that filter to adjust the $link based on your conditions.

    Example:

    add_filter( "av_custom_url", function( $link, $post ) {
       $link = get_the_permalink( $post->ID );
       return $link;
    }, 10, 2 );

    Cheers!
    Ismael

    #1032502

    Hey Ismael,
    Where should I integrate this snippet?
    Bests,
    Andy

    #1032839

    Hi,

    You can add it in the functions.php file or install a custom functions snippet plugin.

    Best regards,
    Ismael

    #1032928

    Hi Ismael,
    I tried it but nothing changed in the search function. There is still the wrong URL in the result drop down.
    Please advice.
    Bests,
    Andy

    #1033406

    Hi,

    Thanks for the update. I’m not that familiar with the plugin and I can’t find any plugin functions in their documentation.
    Please ask the plugin author what function to use to get the download url. You can then integrate that function with the filter above.

    Best regards,
    Ismael

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