Site logo

Archived topic

How to make linked text?

3 replies · Started by Lukasz on April 28, 2020

Viewing posts 1–4 of 4

Hi,
I would like to use the filter generate_404_text to create custom text. In other words I want to put some text let's Homepage as link to homepage (it could be piece of a text). How to do that?

Hi there,

Try this:

add_filter( 'generate_404_text', function() {
    return '<a href="YOUR URL HERE">Your custom text</a>';
} );

Let me know :)

It works perfectly. You are hero.

Glad I could help! :)

This archived topic is closed to new replies.