Add a word to the first // wp_get_attachment_url // as the subdomain name

Question

We use this code to display the link …

$mp3Link = wp_get_attachment_url($mp3_file_id);
<a class="w3-black" href="'.$mp3Link.'" rel="nofollow" >mp3</a>

It looks like this now :

https://example.com/wp-content/uploads/2020/12/Amir.mp3

I want it to be like this :

https://sub.example.com/wp-content/uploads/2020/12/Amir.mp3

I mean, I just want to do this by editing the above code

0
sa eu 5 months 2020-12-21T07:10:41-05:00 0 Answers 6 views 0

Leave an answer

Browse
Browse