• Here is the current situation:

    – I have a new site that I am opening in a month or two
    – On that site is a coloum for news about the site
    – I have a WordPress blog, seperate from the main site, that will have information about the site (construction, maintainence, new sections etc)
    – I would like a script, plugin, or what ever that will pull a few (3-5) latest headlines and when clicked, linked to the full post.

    Does anyone know how I could accomplish this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • 1. Include the following line at the top of the page with the news column:

    <?php
    require('./wp-blog-header.php');
    ?>

    Change the path so that it points to the wp-blog-header.php file in your WordPress install directory.

    2. Add the following line in the place where you want to show the headlines:

    <?php wp_get_archives('type=postbypost&limit=5'); ?>

    Change the number after limit to however many headlines you wish to include.

    3. Be sure to change the extension of the page with the news column to .php so that the server knows it needs to parse some PHP.

    <?php get_archives(‘postbypost’, ’10’); ?>

    That will show a list of 10 titles of the most recent posts. Just change the number to what you want. When clicked, it will goto the full post as you have set to display via your single.php file. If you dont’ have one, then you have nothing to worry as it’ll show the whole post.

    Check the CG-feedread plugin from David Chait. Not sure about just “headlines” but you may be able to customize. Get it here.

    Thread Starter bchacker

    (@bchacker)

    Thanks everyone you have been a big help. I still cant test this because I am still building the main site but i will try them. About the blog header file. Do I need it because the page that will have the news already has the header in it?

    The blog header reference doesn’t actually link to a real header. All that does is just allow you to use WP functions on a static non WP page.

    Thread Starter bchacker

    (@bchacker)

    oah ok thanks

    Thread Starter bchacker

    (@bchacker)

    Now in the type, I can type a category right

    Thread Starter bchacker

    (@bchacker)

    I tried it out and got this error:

    Fatal error: Call to undefined function: get_archives() in /home/thebscp/public_html/divcor/work/ms/current/index.php on line 36

    Thread Starter bchacker

    (@bchacker)

    Nevermind. I got it working. I made a page in my WP dir called news.php that contained the two php scripts. Then on the page I wanted the news, I used iFrames to link over to php which was processed and contained the posts i wanted.

    Thread Starter bchacker

    (@bchacker)

    How do I make it open in a new window instead of the same page

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Plugin advice needed please’ is closed to new replies.