• Resolved yanbu

    (@yanbu)


    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: https://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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter yanbu

    (@yanbu)

    anyone? hoping this doesn’t get buried

    Thread Starter yanbu

    (@yanbu)

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

    check this link:
    https://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

    Thread Starter yanbu

    (@yanbu)

    ok here’s an update:

    https://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?

    moshu

    (@moshu)

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

    Thread Starter yanbu

    (@yanbu)

    . . . thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘posting image and title of last post outside WP’ is closed to new replies.