Support » How-To and Troubleshooting » Possible Bug in Custom Post Types

Possible Bug in Custom Post Types

  • I have a custom post type (portfolio-writings) that’s been working just fine until today, when I tried to start a poetry post with a div. (I needed to put a container on the content, to center it.)

    Beginning a post with word content, rather than code, formats everything correctly (in my case, it displays text in Arial, 17px). However, when I started a post with <div class="center">, it centered my content, but overwrote my text styling.

    When I looked at the code in Firebug, what I found is that whenever I start a post with code, rather than content, WordPress no longer inserts paragraph and line break tags by default; so, of course, I get default Times New Roman. As I’ve done this sort of thing for ages in default WP posts, I’m assuming this is a problem associated with the custom post types. (Could someone confirm this?) For now, I’ve worked around this by inserting my own <p> and <br /> tags.


Viewing 1 replies (of 1 total)
  • I’m not sure this has to do with Custom Post Types (unless you wrote a specific CSS statement for this specific post type…) rather you might want to check your stylesheet.

    Your body font sets the global font family for your website and if font-family: Arial is only applied to P tags and if you use a Div instead of letting the editor auto add a paragraph… you get the idea.
    You might try adding in the stylesheet:
    #content p,#content div.center {font: normal 17px Arial,sans-serif;}

Viewing 1 replies (of 1 total)
  • The topic ‘Possible Bug in Custom Post Types’ is closed to new replies.
Skip to toolbar