Title: Formatting Text Output From PHP
Last modified: August 20, 2016

---

# Formatting Text Output From PHP

 *  Resolved [shadeypwns](https://wordpress.org/support/users/shadeypwns/)
 * (@shadeypwns)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/formatting-text-output-from-php/)
 * I’m currently attempting to build my own theme from the ground up while learning
   php at the same time, how fun. My question is about the Latest News section on
   my site here – [http://107.9.172.144/](http://107.9.172.144/)
 * Underneath the posts title is the authors name and what category the post was
   placed in, which is called up by the following code:
    `By <?php the_author_posts_link()?
   > in <?php the_category() ?>`
 * Simple right? I have no idea why the first part (By “authors name”) and the second
   part (in “category”) are split and aligned completely apart and on seperate lines.
 * When PHP outputs to text does it do some sort of autoformatting? How can I change
   this? I should also mention that this code is being formatted by a css div with
   the following code:
 *     ```
       .postdata {
           margin: auto;
           text-align: left;
           font-family: verdana;
           font-size: 12;  
   
       }
       ```
   
 * Thank you to anyone who can explain this to me!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [fonglh](https://wordpress.org/support/users/fonglh/)
 * (@fonglh)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/formatting-text-output-from-php/#post-3114720)
 * Your postdata style is being overridden by the more specific ul style on line
   15 of style.css
 * Use Firebug or Chrome’s inspector help you debug CSS problems.
 *  Thread Starter [shadeypwns](https://wordpress.org/support/users/shadeypwns/)
 * (@shadeypwns)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/formatting-text-output-from-php/#post-3114723)
 * Thank you very much! I’m still not sure I understand why it thinks that the text
   is an unordered list though..
 *  Thread Starter [shadeypwns](https://wordpress.org/support/users/shadeypwns/)
 * (@shadeypwns)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/formatting-text-output-from-php/#post-3114724)
 * Nevermind! Obviously calling the the_categories displays the output as a list
   by default.. I’m sure there’s a way to change this and I’ll look it up now. Thank
   you again!’
 * Edit: For future googlers, the following code adds a seperator between categories,
   and removes the hardcoded “unordered list” formatting:
 * `<?php the_category(', ') ?>`
 * This creates a comma between categories.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Formatting Text Output From PHP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [shadeypwns](https://wordpress.org/support/users/shadeypwns/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/formatting-text-output-from-php/#post-3114724)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
