bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

Turning profile.php into a blog (sort of)

(3 posts)
  • Started 1 year ago by deeperstillwatersrun
  • Latest reply from deeperstillwatersrun
  • This topic is not a support question
  1. deeperstillwatersrun
    Member

    I'd like to change the profile page to look more like a blog, so I want to have the user's info on the left and the topics that they've started listed down the right complete with text and a link to the topic to read the comments (replies). Right now I'm stuck on how to show the text of the topic post. Here's what I've got so far:

    <?php foreach ($threads as $topic) : ?>
    <div class="post">
    <h2 class="posttitle">
    <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>
    </h2>
    <p class="postmeta"><?php printf(__('posted %s ago'), get_topic_start_time()); ?>
    <div class="the_content">
    <?php post_text(); ?>
    </div>
    </div>
    <?php endforeach; ?>

    but post_text() just returns the text of the first topic for all the topics, instead of each topic showing the text that it's supposed to.
    Thanks for any help...
    (by topic, I mean the first post of a thread - just so we're clear)

    Posted 1 year ago #
  2. try this

    <div class="the_content">
    <?php $blogposts = get_thread( $topic->topic_id); ?>
    <?php echo $blogposts[0]->post_text; ?>
    </div>

    Posted 1 year ago #
  3. deeperstillwatersrun
    Member

    Worked great. Thanks a lot.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.