Let’s say we have a Search Results webpart showing latest 5 news with a wonderful Webpart title saying “News”. It would be pretty interesting that we can click on the webpart title and jump to a custom page that shows all the News article.
OK, SharePoint does a great job with Display templates, where you can control the chrome of all the results and each item, however the webpart title is not rendered directly by the Display template engine, so, if we want to modify the Webpart Title we’d need some jQuery magic from the Control display template.
We can use our custom Control Display template, and inside, we can select the Webpart title using jQuery. The selector we need looks like that:
That way, adding more jQuery we can replace the titleElement with all the html needed, like a link to the News page.
Hope it helps!