Hello, i'm using a theme with this snippet to create a #link to my pages in my index page.
It uses the page link for the navigation.
It works great when my page title is exactly the same as my page permalink but as soon as my page title include a space or two words the pag and the post_title get different and the #link doesn't work anymore.
$new_title = str_replace(" ", "", $pag->post_title); echo ' <li><a href="#'.$new_title.'">post_title.'">'.$pag->post_title.'</a></li> ';
Does someone have a idea to make it work another way?
thanks in advance