get_permalink to output just the path?
-
Hi, I’m editing my
search.php
file and I’d like to display as part of the search results the URL of each result since our site hierarchy is a little crazy but would be informative for our users. But I’d like it to just print
“/resources/library/kids” instead of “https://www.mydomain.org/resources/library/kids”.I saw someone else use
str_replace
onget_permalink
for their issue, so I guess I should be trying to change the permalink string somehow – I don’t know PHP but I sure can copy and paste. This will only be my own site search, so the part I want to remove will always be the same thing, same length…if that helps.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get_permalink to output just the path?’ is closed to new replies.