OK it might sound stange but I am facing a good challenge with wordpress.
when echoing the_permalink();
and checking the portfolio pages, I am getting a link something like this:
http://www.domain.com/?portfolio=test
(Where test is the portfolio name).
Is there any option to return the permalink trimmed to ?portfolio=test
keeping out the domain url?
While asking, I think I got the answer already (trim()
) but I would like to hear your ideas too.
every answer will be much appreciated!
You can obtain the permalink of a post by doing something like so:
The get_option method replaces the deprecated get_settings method, and allows you to retrieve named option values from the database:
http://codex.wordpress.org/Function_Reference/get_option
The ‘home’ value passed in to the get_option method will return the site URL.