From https://gohugo.io/methods/menu-entry/pageref:
The use case for this method is rare.
In almost also scenarios you should use theURL
method instead.
To give you an idea of rarity, I have seen only one scenario where the PageRef
method was needed.
If you need help with one or menu entries not rendering as expected, you will need to share some information with us.
See Requesting Help.
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.