-
AuthorPosts
-
November 6, 2018 at 2:17 pm #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,
AndyNovember 8, 2018 at 5:37 am #1031097Hey 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,
IsmaelNovember 8, 2018 at 11:37 am #1031171Hi Ismael,
Thanks, but I don’t know what should I Do with this snippet.
Please explain.
Bests,
AndyNovember 9, 2018 at 5:39 am #1031520Hey!
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!
IsmaelNovember 12, 2018 at 9:45 am #1032502Hey Ismael,
Where should I integrate this snippet?
Bests,
AndyNovember 13, 2018 at 2:06 am #1032839Hi,
You can add it in the functions.php file or install a custom functions snippet plugin.
Best regards,
IsmaelNovember 13, 2018 at 11:07 am #1032928Hi 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,
AndyNovember 14, 2018 at 10:47 am #1033406 -
AuthorPosts
- You must be logged in to reply to this topic.
