Support » Fixing WordPress » Blog Posts stripped of all formatting and links

Viewing 14 replies - 1 through 14 (of 14 total)
  • What exactly is the issue?

    Thread Starter sock2me

    (@sock2me)

    I have an Href in that page, and some formatting that shows in the editor but is getting stripped. There’s no link or formatting when I get to the page in the browser…

    Are you using the text editor or the visual editor?

    Thread Starter sock2me

    (@sock2me)

    I’ve tried both. It doesn’t make a difference. I’ve tried a combination, adding it to the text, then going to html and publishing, visa versa…no switching and publishing… doesn’t matter…

    Looks like that may be an “excerpt” – which DOES strip formatting and links – see:

    http://codex.wordpress.org/Template_Tags/the_excerpt

    Thread Starter sock2me

    (@sock2me)

    Thats what I thought so I went into page.php and saw that it was content and not except. BUT… maybe that’s not the right template? How do I tell what page template it uses to display this page?

    Thank you – I will try to fix..

    The output HTML shows this in the body tag

    <body class="single single-post postid-99 single-format-standard cat-1-id">

    So not likely a page.

    This is a great plugin for this situation :)!

    http://wordpress.org/plugins/what-the-file/

    That plugin looks super handy. Thanks WPyogi!

    Thread Starter sock2me

    (@sock2me)

    That is a handy plugin!
    So it’s using the single.php template and on mine, the code is (I’m not sure what to change?):

    <?php get_header(); ?>

    <div id=”main_outer”>
    <div class=”wrapper”>
    <div id=”main”>
    <section id=”body_container”>
    <div id=”inner_container”>
    <div class=”left_sec”>
    <div class=”row”> </div>
    <?php if(have_posts()): while( have_posts() ): the_post();?>
    <div class=”row”>
    <h4>
    <?php the_title();?>
    ,
    <?php the_time(‘M d,Y’)?>
    </h4>
    <?php $cont = get_the_content(); ?>
    <?php $content = strip_tags($cont);?>

    <p> <?php echo $content;?></p>

    </div>
    <?php endwhile; endif;?>
    </div>
    <?php get_sidebar(‘right’);?>
    </div>
    </section>
    <?php get_footer(); ?>

    Get rid of these and test it out.

    <?php $cont = get_the_content(); ?>
    <?php $content = strip_tags($cont);?>
    Thread Starter sock2me

    (@sock2me)

    That seemed to delete the content on the page. Nothing except the title (had to add the code back in due to the site being live)

    Any other ideas?

    Thank you for your help by the way – I really appreciate it.

    Oops! Replace this line:

    <p> <?php echo $content;?></p>

    with this:

    <p> <?php the_content(); ?> </p>

    Thread Starter sock2me

    (@sock2me)

    OOOOOOOOHHHHHHHHHHHHHH

    IT WORKED~!!!!

    You are AWESOME!

    Thank you sooo much! I really appreciate you help on this!

    BOOM!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Blog Posts stripped of all formatting and links’ is closed to new replies.