I saw this post to use a plugin to customize the nothing found page.
I am using Loco Translate to customize the static text on this page. It would be great to add simple HTML to the Loco translation, such as bold, paragraphs, and bullet points. A link would be nice too, but not necessary.
I was reading up on escaped text in the Loco Translate faqs and WordPress documentation.
How can I enable HTML formatting on the nothing found page without installing another plugin? Is there a specific string I can filter the text to allow these HTML tags while escaping anything else?
Usually, Loco Translate does not allow adding HTML and cuts it out when it is displayed on the page because of security reasons (for example, if you need to outsource the translation to a third party and do not want to have the code injection). As a workaround, we recommend overwriting the 404 page through the template part and child theme using this documentation:
OK, as it turns out…the 404 is working properly. If I type an erroneous URL, I see my custom 404 error message. Thanks again, @condorito.fr !
I also want to change the “nothing found” message that appears for no search result matches or a vendor profile page that has no listings. @andrii, I tried to follow the two how to’s you provided. I could not find the template part in the ListingHive theme to overwrite for this. Can you point me in the right direction please?
Please note that this is already a specific 404, and you need to overwrite this template part using a child theme: How to override template parts - HivePress Help Center. That is, you need to copy this template part hivepress/templates/page/no-results-message.php at master · hivepress/hivepress · GitHub to child-theme-folder/hivepress/page, but note that this template part is the same and is used for listing search results as well (but, for example, you can add inside the condition, if it is a vendor page, then show a different message, if it is a listing, then the old one).