get_permalink to output just the path?
-
Hi, I’m editing my
search.phpfile 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 “http://www.mydomain.org/resources/library/kids”.I saw someone else use
str_replaceonget_permalinkfor 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.
The topic ‘get_permalink to output just the path?’ is closed to new replies.