Is there a way to hide the website address on front end when using esc_url ?

[ad_1]

I run a directory website and I noticed that some of the clients are using their UTM links when they fill in their website addresses via their user account. That’s fine, however, on the front end of the live site, the website address displays and it’s so long.

Ideally I’d like it to just say “visit website” vs have the whole address showing, especially with so many using UTM.

The site uses esc_url in the php file

[ad_2]
2 Comments
  1. I’m not really sure what the problem is? Just change the PHP template file to output whatever you want? <a href=”<?php esc\_url($your\_var);?>”>Visit Website</a>

    Edit: Of course, if this is a theme you did not create, you’ll need to create a child theme to modify the template file. Otherwise, if you edit the theme itself, whenever you update it, your change will be removed.

  2. I’m not sure how you’re displaying the content on front-end.

    If you’re using a custom template to display the content, then you can easily edit it.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer