Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display WP Blog Posts on Forum


  • 723416
    Inactive

    I have the blog and forum installed (example.com/blog and example.com/forum) using the same database. I’m in the process of creating a Community homepage similar to the feel of the WordPress support page at http://wordpress.org/support/ – with the exception that I want my blog posts on the left above the search section. I simply want the forum homepage to read and display the blog posts – with links back to the blog.

    How do I get this to happen? I’ve searched everywhere and nothing on this. Ideally, I want to work from the forum, but if it’s easier, how can I get my blog to read my forum topics? (the Latest Discussion plugin works, but I don’t want latest discussions…I want forum topics.) Any help is greatly appreciated.

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

  • chrishajer
    Participant

    @chrishajer

    I think you want bbSync, at least to start:

    https://bbpress.org/plugins/topic/bbsync/


    723416
    Inactive

    Thanks for the quick reply. I saw bbSync previously, and it is not what I need because I don’t want my blog posts to turn into forum topics. I simply want to display my blog posts on the forum homepage. There are actually not going to be any (or rarely any) commenting on our blog posts – it’s for information only. But I want a community homepage that combines the latest blog posts and forum main themes (or categories – not topics as I stated above).

    Is there code I can insert to grab the blog posts? Or is there a way to grab and read the blogs RSS feed? If so, how? Thanks again in advance.


    chrishajer
    Participant

    @chrishajer

    I don’t know of a plugin yet that will take an RSS feed and display it in bbPress.

    How about creating a plugin out of something like RSS2HTML and using that in bbPress?

    http://www.rss2html.com/


    723416
    Inactive

    I tried your suggestion and could not get it to work, and not savvy enough to create my own plugin from scratch. It would seem like all I have to do is get the page to recognize and load all the forum and blog includes, then just call up my posts like I have on my blog homepage. I just couldn’t get this to go…but maybe I’m on the wrong train of thought or missing something. This to me would be true “integration”.

    Any other ideas or suggestions out there?

    Why don’t you just make a sql query ? If you have both WP & BB in the same database it should be easy. Something like:

    $blog_posts = $bbdb->get_results("SELECT FROM wp_posts WHERE post_status = 'publish' ORDER BY post_date DESC LIMIT 10");
    echo '<ul>';
    foreach ($blog_posts as $post)
    printf('<li><a href="/?p=%i">%s</a></li>', $post->post_ID, $post->post_title);
    echo '</ul>';
    unset($blog_posts);

    Of course this has errors, i made it without looking ad the db fields. Also, is it get_results or get_rows? I forgot :p


    chrishajer
    Participant

    @chrishajer

    fiat, to do what you’re talking about, you can load WordPress inside bbPress, to have access to WordPress functions inside bbPress. It’s not recommended, but here it is:

    https://bbpress.org/documentation/integration-with-wordpress/#func

    https://bbpress.org/forums/topic/wp-integration-header-integration#post-17084


    723416
    Inactive

    Many thanks for all the good suggestions. I tried loading the wordpress functions as suggested in previous posts and could not get it to work. Same problem with SQL queries (though I’m sure I’m doing something wrong). I went back and tried the rss2html function and got it to work – so I think I’ll be able to tailor it enough to do what I need.

    This would be a great plugin, for those who are able to do it:)


    chrishajer
    Participant

    @chrishajer

    I actually started on this as a plugin, my first one. We’ll see how it goes.

    After all this problems I’m having I’ll start studying php.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar