WordPress.org

Ready to get started?Download WordPress

Forums

changing generated html for images from the_content (2 posts)

  1. Chris Laursen
    Member
    Posted 3 years ago #

    I want images on my pages & posts to not have height and width declarations in the html. How can I strip this code from the_content?

    this is my page.php code:

    <?php get_header(); ?>
    <?php while (have_posts()) : the_post(); ?>
      <?php the_content(); ?>
    <?php endwhile;
    get_footer(); ?>

    this is the relevant generated code for one page:

    <p><a href="http://alexandrarothwell.com/wp-content/uploads/2011/04/blueyeller.jpg"><img class="aligncenter size-large wp-image-117" title="blueyellerreal" src="http://alexandrarothwell.com/wp-content/uploads/2011/04/blueyellerreal-239x800.jpg" alt="" width="239" height="800" />
    </a></p>
    	<h1>ventilator blues</h1>

    so how can i get rid of the width and height text?

    Thanks!!!

  2. phe.le
    Member
    Posted 3 years ago #

    Go to Posts or Pages and remove them in HTML.

Topic Closed

This topic has been closed to new replies.

About this Topic