If the “front page” can be altered to a PHP document (i.e. index.php), adding content from WordPress is simple, because turning a regular page into a WordPress one just involves adding this right at the top:
<?php
require_once("./wp-blog-header.php");
?>
If your blog resides in a subdirectory, say “/blog”, then you change it to:
<?php
require_once("./blog/wp-blog-header.php");
?>
Then to include a recent post on the front page, add something like this where you want it to appear:
<?php
$posts = get_posts('numberposts=1');
foreach ($posts as $post) :
start_wp();
?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></h3>
<?php the_excerpt() ?>
<?php
endforeach;
?>
Play with the layout–look at your blog’s index template to see the tags you presently use on it.
Thanks, Kafkaesqui – This did work!
It was easy to turn the index page into php, but I confess it took me several hours to figure out where in the file the extra code should go. I finally figured it out, though, and have it just like I wanted it (If you want to see it, it’s at http://www.dialogicconsulting.com).
It’s a bit of a workaround, as Publisher automatically creates its own .pub files which are then automatically turned into HTML — so I won’t be able to reopen this in Publisher to edit; but since I only plan on having the extracts on the indext page (outside of the WP pages), now that I’ve kinda figured it out, I figure I can hand edit if I need to redesign or change content in Publisher.
Again, thanks for the help!
A few more questions now that I’m in it:
I switched to the_excerpt_reloaded so that I could limit the length of the content excerpts. It’s working great except for two things
(1) I have forced_more_link set to false — the problem is that there’s no return following excerpts that are less than what’s been established — so the next excerpt title doesn’t start on a new line.
(2) any ideas how to determine the width? I’ve tried tables, divs etc and can’t make it seem to “listen” to the parameters.
Any help appreciated π
Perfect. As always thank Kafkaesqui.