WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So Long story short, im working on a custom theme and wrapping the WP hooks onto said theme etc and i noticed that, When writing a post/page etc, that say for example i want to make a word bold/italic etc, That applied styles dont come through.

So for example, say i select a word, click the "B" icon to make the word bold, its visually displays the word as bold on the editor but when i save and preview the page, the text is normal. There are no visible stylings on the word whatsoever.

I also tried to go into the HTML pane, and apply the html tags manually like <b></b> or <i></i> etc and, the same thing, i save and preview page and the text appears as if no style was apply.

Any ideas as to whats going on? Probably something im missing? Any Tips, links etc i humbly appreciate.

Thanks in advanced.

***edit: this is my current wp post loop


while( have_posts() ) : the_post() ?>
<div class="post">
<h3 class="entry-title"><a href="<?php the_permalink();  ?>"><?php the_title(); ?></a></h3>
<div class="entry-content"><?php the_post(); ?></div>
<div class="entry-content"><?php the_content(); ?></div>
<?php endwhile; ?>
share|improve this question
Were the strong and em tags present in preview? If yes, then you have to style them. – Satish Gandham May 22 '12 at 14:42
no they werent there in the preview. while im typing the text in VISUAL mode, they appear as bold/italic etc, but when i preview/publish, they dont appear – somdow May 22 '12 at 15:13
This question cannot be answered without seeing actual code (CSS). It can probably be answered with a live link to a page demonstrating the problem. – Chip Bennett May 22 '12 at 16:14
up vote 1 down vote accepted

Most likely, your theme uses some form of CSS reset. Your markup ("b", "i", etc) is probably being saved and rendered correctly, but the CSS reset overrides all of the styles that the browser would normally apply. Try viewing the source of your page, and see if the markup ("b" tags, "i" tags, etc) actually exists. If so, you've got a reset problem. All you need to do is add styles specific to whatever container wraps your posts (probably a div with the class "post"). For example, to make your b tags bold again, you might add ".post b { font-weight:bold; }" to your stylesheet.

The other possibility is that you're using the_excerpt() to render content. By default, all markup is stripped form excerpts--this is expected behavior. You won't see any formatting at all unless you use the_content() or something equivalent.

share|improve this answer
your the man. thats exactly what it was. i had somehow i guess dropped in an older cssreset thinking it was my main one and it was an olderone that had those tags being reset. I placed the new one on there and it works. Thanks – somdow May 29 '12 at 16:00

Sometimes you need to apply the_content filter to your post_content.

Examples with the_content filter:

$content = get_the_content();
$content = apply_filters('the_content', $content);

for($i = 0; $i < count($allPosts); $i++){
    $content = apply_filters('the_content', $allPosts[$i]['post_content']);

foreach($allPosts as $thePost){
    $content = apply_filters('the_content', $thePost['post_content']);  

Otherwise, check into setup_postdata()

share|improve this answer
hello michael, thanks for the response, where would i put this loop? – somdow May 29 '12 at 15:29
@somdow Please update your question with the code for your current loop, and I will be able to further assist you. – Michael Ecklund May 29 '12 at 15:31
done. Not sure if the variables you used like "$content,$allposts" etc are....im lost lol, but i added the loop. Thanks in advanced – somdow May 29 '12 at 15:37
@somdow Did you try what MathSmath said? Try viewing the source of your website. Are the HTML tags actually being rendered? – Michael Ecklund May 29 '12 at 15:38
FINALLY, i was lost because i...i guess i somehow overwrote my main css reset with an older one....i dropped in my main which had those tags and a few others removed and it worked! but thank you because i wouldve still been lost. – somdow May 29 '12 at 15:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.