WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am stuck in replacing post ID by custom post name in url. link is as shown below: href="'.$url.'/'.$options['applyp'].'/?pos='.$post[$i]->ID.'" i need to replace ?pos='.$post[$i]->ID.' by custom postname.. I tried /%postname% but got an error.

The error was something like this. Parse error: syntax error, unexpected '">

I also tried by using http://codex.wordpress.org/Using_Permalinks. I got same error

Can somebody help me in resolving this issue?


share|improve this question
Did you try permalinks under setttings codex.wordpress.org/Using_Permalinks – Maruti Mohanty Dec 3 '13 at 11:10
thank you for the suggestion. – WPDeveloper Dec 3 '13 at 11:16

Under Settings>Permalinks you merely have to select "Post Name" to get the post name in the permalink. If you are getting parse/syntax errors something else is going on and I suggest you revert to the default theme and disable plugins until you determine where the problem is coming from.

Change permalinks

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.