Adding a max-width to Posts! (3 posts)

  1. skerwin1989
    Posted 4 years ago #

    Hello I'm using wordpress and I've just got my "latest post" to show on my homepage (www.skerwin.co.uk) but I need to set a max image size for the bit displayed on my website, the php used to display my post is:

    // Include WordPress 
    define('WP_USE_THEMES', false);

    <?php while (have_posts()): the_post(); ?>
    <span class="RED"><?php the_title(); ?></span>
    <?php the_content(); ?> 
    <p>">Read more...</p>
    <?php endwhile; ?>

    Which is just pasted into a div tag, any help with setting a max image width so it doesn't ruin my layout when I post pictures would be much appreciated, a swift response would also be greatly appreciated!

  2. dylan
    Posted 4 years ago #

    You have a couple options, the way I see it.

    One: WordPress allows you to set the max size of images you upload into its media section. That's dashboard > settings > media.

    Two: CSS might help. It has a max-width property: http://www.w3schools.com/cssref/pr_dim_max-width.asp

  3. skerwin1989
    Posted 4 years ago #

    Much appreciated for a swift response, that's a great help, don't suppose you know how to include the date of the post on my website?

Topic Closed

This topic has been closed to new replies.

About this Topic