• I work for a web design company and am looking at the best way to integrate WordPress blogs into our client’s existing websites. I am thinking that this type of code will work:

    <?php
    require('../Wordpress/wp-blog-header.php');
    ?>
    
    <?php
    $posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
    foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(); echo "<br />"; ?>
    <?php the_title(); ?>
    <?php the_excerpt(); ?> 
    
    <?php
    endforeach;
    ?>

    The reason for this being that it will use the website’s styles. I’ve considered looking into creating a theme for each website but it seems this would be a pretty big job and would have to be done for each website. The benefit of using the method I posted above being that we could pretty much chuck the same WordPress related code into each website and that would pretty much be that. The downside is that the code above doesn’t do everything we need. We would want it to page if the number of posts reached a certain number, possibly have the title of the blog post to link to an individual page with the post on it and a few other bits that WordPress allows you to do.

    Does anyone have any good examples of this type of thing or can recommend good resources. I’ve been looking on the WordPress website and can’t see any particularly good examples (although there may be loads but the site is so packed full of info) but if anyone has links to them it would be great if you could post them. Also, what does everyonen think of the way I’m going to integrate WordPress blogs into existing sites? Is it the best/easiest way to do it?

    Cheers ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • I could use this info as well

    I think the best way to integrate is not to.

    really, theming wordpress into an existing site is more copy/pasted than anything else. If your needs for a blog are minimal – that is, a blog chronology and a single posts page, then you only really need to work up two templates, and an is_category conditional to display your cat links as excerpts via the index template.

    two files.

    as for the css, it is quite possible to use your existing site’s styles on your wordpress theme. Even if the wordpress classes are a bit different, there’s nothing stopping you from specifying multiple class names, or nested elements in your existing CSS.

    so what’s left to do? make two pages with a couple of php functions in them which remain identical for every site you make from here on?

    big deal.

    better than dealing with the fallout of integration and trying to integrate the targets of any hyperlinks in your blog format, yadda yadda…

    I will tell you something for free, though…

    if you’re integrating wordpress into your webside designs, then you’re *NOT* using the right CMS for making your sites in the first place.

    there are a lot of choices for CMSs, and the vast majority of them offer an easy way to stuff a blog template into your design. If you’re not using any of those already, then you could consider using wordpress to manage the whole site, and forget about pointless static pages.

    think it over.

    Thread Starter b4ng83

    (@b4ng83)

    Hi Ivovic, thanks for your reply. What you described in your first few paragraphs sounds just like what we would want but it’s difficult to know how to implement this without spending days researching and testing this sort of thing. Do you know of any good resources where this is described or do you have a blog from where you can detail this technique? Any help would be most appreciated ??

    this is a good start… and links to the rest of what you’ll need.

    https://codex.www.ads-software.com/Theme_Development

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress, Best Way to Integrate?’ is closed to new replies.