html - Internal link in WordPress footer.php file not working -



html - Internal link in WordPress footer.php file not working -

i creating kid theme , have added link in footer.php file page within website. used wordpress recommended:

<a href="<?php echo esc_url( get_permalink( get_page_by_title( 'page title' ) ) ); ?>">page title</a>

which displays proper url when link clicked, 404 error. determined if set permalink setting default bring page, url permalink id, not slug. want utilize post name permalinks seo purposes. suggestions?

with out seeing resulting url it's hard problem is. i'm guessing you're using illustration here on get_permalink() function page. guess don't need utilize esc_url() function. according stephen harris get_permalink() performs it's own sanitation using esc_url() on not necessary despite beingness "recommended" on codex.

it more helpful if posted link page or @ to the lowest degree resulting code.

php html wordpress wordpress-theming

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -