WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] posting image and title of last post outside WP (6 posts)

  1. yanbu
    Member
    Posted 8 years ago #

    hello all. i'm trying to do some custom formatting for displaying the most recent posts from one of my wordpress blogs on a different page (on the same website). what i want to do is here: http://www.10eastern.com/draw/

    right now i'm just using <?php
    require('../wordpress/wp-blog-header.php');
    ?> at the top of my php page and <?php wp_get_archives('type=postbypost&limit=5'); ?> to post the list of the last five posts.

    that works fine, just not sure how to go about getting what i want (i created my own table there with the post title and the image from the post to show what i want to do). most of the posts on my blog are basically a title, and an image, no accompanying text. i'm planning on posting the content of a few blogs in different divs or tables elsewhere on the site.

    is it possible to force image dimensions to a set width? i'm hoping to limit the width to 150 pixels. thanks in advance.

  2. yanbu
    Member
    Posted 8 years ago #

    anyone? hoping this doesn't get buried

  3. yanbu
    Member
    Posted 8 years ago #

    ok to summarize again in case i wasn't clear:

    check this link:
    http://www.10eastern.com/draw

    i'm trying to display the last post in my weblog on a different php page, but i'd like to display the image contained in the post and the title above it. i'm currently just using: <?php wp_get_archives('type=postbypost&limit=5'); ?> to display the last posts.

    i'm hoping to be able to output them to a fixed width table, and maybe use css to control the formatting. but i'm not sure how to go about this. any help would be appreciated (check the link, i created an example of what i'm hoping to do)

    thanks

  4. yanbu
    Member
    Posted 8 years ago #

    ok here's an update:

    http://www.10eastern.com/draw/index2.php

    i got the content to display (the three posts with larger images are being called with:

    <?php
    $posts = get_posts('numberposts=3');
    foreach($posts as $post) :
    setup_postdata($post);
    ?>
    " id="post-<?php the_ID(); ?>"><?php the_title(); ?>
    <?php the_content(); ?>
    <?php endforeach; ?>

    i tried sticking them into a fixed-width table of 200 pixels but it breaks out of it to it's larger size. i just want to post a summary of the last three posts, on another page and squish em into a small table.

    how can i auto-limit the image dimensions to a fixed-width? OUTSIDE of wordpress? eh?

  5. moshu
    Member
    Posted 8 years ago #

    The image size has nothing to do with WordPress. Re-size your images in an image editor.

  6. yanbu
    Member
    Posted 8 years ago #

    . . . thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags