0

I have question regarding the permalink on my home.php page. How can I make link in home.php page which goes to certain post - so kind of jump automatically to certain area in my single.php page with 12 post on one page. So it will be kind of permalink with anchor together

1
  • <a href="<?php the_permalink(); ?>#......"></a> ???
    – sealionin
    Dec 22 '16 at 8:11
1

You are on the right way.

<a href="<?php print get_permalink($id_of_the_post_you_want_to_link_to); ?>#......">Link</a> 

the_permalink() makes only sense in a post loop. But get_permalink() is accepting a parameter of another post and gives you its permalink.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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