Skip to:
Content
Pages
Categories
Search
Top
Bottom

Displaying contents of admin post on site\’s front page


  • thebigk
    Participant

    @thebigk

    Hello,

    This must be simple but I\’m not able to figure this out. When I choose the widget to display most recent admin posts on the site front page, it only displays the title text (as a link). I\’d rather want to show the full post or upto \”read more\” link.

    This is just like on buddypress.org where Andy\’s posts are displayed on front page.

    How do I do that?

    Update: There’s a difference between the default “Recent Blog Posts” and “Recent Posts” widgets. The recent blog posts shows the posts from the blogs of all the users registered on the site. The ‘Recent Posts” (admin’s posts) shows the links, instead of the blog text.

Viewing 4 replies - 1 through 4 (of 4 total)

  • thebigk
    Participant

    @thebigk

    Sorry for being impatient. Anyone knows how to do this? Looks pretty simple to me but still can’t figure out myself. It’s the core wordpress functionality.


    talk2manoj
    Participant

    @talk2manoj

    For displaying admin post only use following steps

    1. Use \”Recent Blog Posts\” widget

    2. Open bp-blogs-widgets.php under mu-plugins/bp-blogs

    3. Paste following code at line no. 36 i.e. just after <?php foreach ( $posts as $post ) : ?>

    <?php if ($post->post_author==1) {?>

    4. Close } at line no. 50 i.e. just after end of li

    5. Done!


    thebigk
    Participant

    @thebigk

    Boss,

    This is not working. I pasted <?php if ($post->post_author==1) {?> just after <?php foreach ( $posts as $post ) : ?>

    and put a } after the

    I got an error saying unexpected end of foreach loop :(

    What am I doing wrong?

    Just out of curiosity -Is it possible to tweak the “recent posts” plugin to show the post text instead of the post link?


    talk2manoj
    Participant

    @talk2manoj

    Your code should look like this

    http://manojkumar.org/bp-blogs-widgets.tiff

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Displaying contents of admin post on site\’s front page’ is closed to new replies.
Skip to toolbar