简体   繁体   中英

Wordpress Categories and Tags not linking

I am not sure why this issue has risen up, never had this problem in any of my other blogs that I have done. But perhaps someone is able to shed some light on this.

I have a list of posts. TITLE | CATEGORIES | DATE

The title links correctly, But the CATEGORIES do not. My Code for displaying the category is:

<li class="category"><?php the_category(', ') ?></li>

When I click the category link it displays 404 not found but there is a URL issue that comes in:
http://domain.com/categoryName
SHOULD BE
http://domain.com/ category /categoryName

I do have the exact same issue with the TAGS but I don't know what to reference for the TAG feature.

I used the Default Widget for "most popular tags" and it just doesn't link properly no matter what... and it too has the url of:

http://domain.com/tagName

Any help would be appreciated.

The function the_category() only returns the category names, where are you generating the href?. Wherever you're specifying the url in your code, you should just be able to add /category/ . I'd need to see more code to be more helpful.

Also, the_category() will return all the categories, so if you have more than one category, it might screw up your url more. Again, would need to see more code.

Sorry about this post, it was an issue with the previous theme-author. He removed the the code for the categories.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM