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
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
Hi Ismael,
Thanks, but I don’t know what should I Do with this snippet.
Please explain.
Bests,
Andy
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
Hey Ismael,
Where should I integrate this snippet?
Bests,
Andy
Hi,
You can add it in the functions.php file or install a custom functions snippet plugin.
Best regards,
Ismael
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