PHP pisser
June 28, 2005 4:58 PM Subscribe
Need help with PHP puzzle.
Am transferring WordPress templates. Going from something someone cobbled together for me to a modified Kubrick theme. Am not even close to a PHP expert. Need help.
For some reason, the php code in my modified version of Kubrick is displaying the posts' categories as a list element. I can't for the life of me figure out why.
Here's what I can give you.
An excerpt of the php code that deals with post title and content is here. (Sorry, but I couldn't get the text file to wrap.)
The funky category display is here. (Yes, I know the author information is missing; I removed it for this question.)
When you view the source of the latter document, it displays like this:
Filed under [ul class="post-categories"]
[li] [a href="url" title="View all posts in Category"] * Category Name * [/a] [/li] [/ul]
So, the question:
What in the hell is adding the "ul" and "li" stuff in there? It's not in the PHP index page. Is it a CSS problem? I can't find the culprit there either.
Am transferring WordPress templates. Going from something someone cobbled together for me to a modified Kubrick theme. Am not even close to a PHP expert. Need help.
For some reason, the php code in my modified version of Kubrick is displaying the posts' categories as a list element. I can't for the life of me figure out why.
Here's what I can give you.
An excerpt of the php code that deals with post title and content is here. (Sorry, but I couldn't get the text file to wrap.)
The funky category display is here. (Yes, I know the author information is missing; I removed it for this question.)
When you view the source of the latter document, it displays like this:
Filed under [ul class="post-categories"]
[li] [a href="url" title="View all posts in Category"] * Category Name * [/a] [/li] [/ul]
So, the question:
What in the hell is adding the "ul" and "li" stuff in there? It's not in the PHP index page. Is it a CSS problem? I can't find the culprit there either.
Best answer: I don't mean to be condescending in mentioning that it's a WordPress Template Tag, it's just that knowing the name of something is most of the battle when you're trying to find help. That Wiki link I gave you should be a complete resource on WP's tags.
posted by evariste at 5:17 PM on June 28, 2005
posted by evariste at 5:17 PM on June 28, 2005
Best answer: What evariste said. The actual function that outputs the category is called the_category(), which is found in the file template-functions-category.php, in the wp-includes folder, line 60. It checks to see if you've specified a separator, and if not, it does the unordered list thing.
posted by greatgefilte at 5:19 PM on June 28, 2005
posted by greatgefilte at 5:19 PM on June 28, 2005
This thread is closed to new comments.
posted by evariste at 5:14 PM on June 28, 2005