Help with a simple php code
-
Hi, I have this function in my functions.php file:
<?php $return = str_replace('target="_blank" href="http://localhost/test/', 'href="http://localhost/test/', $return); ?>I would like to replace http://localhost/test/ with something like:
<?php echo esc_url( home_url( ) ); ?>but I can’t do that because I need to close the php tag first before opening it again. Problem is I don’t know where.
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Help with a simple php code’ is closed to new replies.