On my local machine I am running a WordPress website. When I try to go to my posts, it redirects to my home page.
I want it to show the corresponding page (post’s page). Searched in all forums. All in vain.
Do you have any suggestions where to start or how to fix this problem?
You could just update your orignal post, instead of having us trying to read your code in comments-format.
However, from the code you posted I see two problems.
‘category_name=Key Links…’ category_name takes a string, which should be the slug-name of your category, “Key Links” can’t be your slug since slugs don’t allow spaces. So the query is prolly grabbing all posts, disregarding category.
The other problem is where you generate the link
you don’t specifiy a url for the link to point to, it should be