Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a one page template(muse theme) which its main menu items link to a specific part of the page in the webpage itself. I want to add # character before post name to go to the specific part of the page just like wikipedia. How can I do that in permalinks? It doesn't allow # character.

share|improve this question
    
Do you mean this? Is a link from wikipedia. http://en.wikipedia.org/wiki/Wordpress#Awards If yes, this only a anker inside the html, there is always possible to add to each link url. You find more information in html documentation about anker. –  bueltge Apr 30 at 15:09
    
@bueltge, No I mean its not in my post, its a navigation menu which I've defined in menus section. Its a primary menu item. –  1linecode Apr 30 at 15:10

1 Answer 1

Maybe this works, currently not tested. Only a idea to enhance for the custom var. Also I don't the goal right.

add_filter( 'query_vars', 'add_custom_query_var' );
function add_custom_query_var( $vars ) {

  $vars[] = '#';
  return $vars;
}

A other hint is the link to the codex, to filter the rewrite of WP.

share|improve this answer
    
It doesn't work buddy, I want localhost/#services . It produces localhost/services –  1linecode Apr 30 at 15:22
    
Do you have seen the example on the codex link? It have a example to create new rule. –  bueltge Apr 30 at 15:27
    
Yes I saw it and tried it but it doesn't work –  1linecode Apr 30 at 15:31

Your Answer

 
discard

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.