• Resolved Firebird

    (@firebird)


    Hi,

    I was searching for a topic like this and I found some, exept the methods they used dosen’t work for me.

    Anyway, I would like to display my 3 most recent posts in a category on my site. Is there a way to do this by just adding some PHP code? Or a plugin of some kind?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Is the blog and the “site” on the same domain?
    Or is this a totally different site soemwhere else?

    Thread Starter Firebird

    (@firebird)

    Sorry, I ghould have given more info. Here it is –

    Here is the structure –
    -root
    -blog (blog.firephoenixnet.com)
    -site (firephoenixnet.com)

    The site is not running wordpress.

    1. Use your RSS feeds – you will need a feedreader application on the meain site.
    2. Use a “recent-posts” plugin and on the top of the file where you want your posts put this, above everyhting else:
    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    (obviously replacing the path-to-your-blog with the real path)
    3. Insert The_Loop in your main website
    4. Integrate WP in your site:
    http://www.transycan.net/blogtest/2005/07/05/integrate/

    Note that if you install the CG-PowerPack (without even ACTIVATING anything!), you can then use CG-FeedRead to pull in your own feed via PHP. CG-FeedRead has NO reliance on WP, so you can call it from any PHP-based page for displaying feeds (yours or other…).

    It does help if your main site and wp site are the same, just different folders. You can install the powerpack under wp, and then something like:
    include(“yourwp/path/to/plugins/cg-plugins/cg-feedread.php”);

    Then, see the CG-FeedRead docs for calling getSomeFeed() to display RSS/ATOM/etc. feeds.

    The advantage of this over 2, 3, and 4, is that CG-FeedRead caches the feed data, and the generated HTML output, internally and can spit it back out at a moments notice with very little overhead. Whereas the other options, unless you are running WP-Cache, have to go and do DB queries EVERY pageload. and, worse than that, they all also carry the overhead of loading up the entire WP codebase on EVERY pageload…

    -d

    Thread Starter Firebird

    (@firebird)

    Thanks, I tried feedread, exept it broke my wordpress instalation when I activated it. So I de-activated it, and it’s fine. But if I don’t have to activate it, it’s perfect!

    I’ve been looking at CG-PowerPack, but is it possible to display feeds in an .html page? My blog is on the same server and domain as my “main” site, which is plain html. I’d like to display recent posts on my main site to encourage visitors to the blog.

    TIA

    Generally it’s not a good idea to post to a [resolved] thread….

    CG-PowerPack is a WP plugin, based on PHP. I don’t *think* you can call a php function in a html page. There are options out there for including RSS feeds in html however.

    Sorry – found this post with “search”, and I didn’t notice it was resolved. Thanks for your help though!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Displaying my posts on another site’ is closed to new replies.