Viewing 9 replies - 1 through 9 (of 9 total)
  • If you already have a .php driven site, yes.

    Thread Starter vivithemage

    (@vivithemage)

    It is PHP driven.

    Would that link work for me?

    Is the home page wordpress too?

    Thread Starter vivithemage

    (@vivithemage)

    It’s a website – > https://vivicalhosting.com/

    I plan to move the box around, and put the blog ‘feed’ into it. It won’t be HUGE (300×200 or so), I just want room to show updates/news and what have you, from the blog.

    Thread Starter vivithemage

    (@vivithemage)

    Any ideas?

    you could use an <iframe> in your webpage and point it to the ‘blog’.
    you’ll proably need to make a custom wordpress theme just with the ‘index.php’ without header, footer, sidebars; only 300px or so wide.

    Thread Starter vivithemage

    (@vivithemage)

    I thought there would be an easy way to just pull the data from the latest blog.

    wouldn’t an iframe basically put the blog inside of a frame, the FULL blog (anything at blog.vivicalhosting.com?).

    you can try adding the following code to your websites homepage


    <?php
    $wp_post_query = mysql_query("select wp.ID, wp.post_content, wp.post_title, wp.post_date, wp.post_author, wp.comment_count FROM wpb_posts wp LEFT JOIN wpb_term_relationships wtr ON wp.ID=wtr.object_id WHERE wp.post_status = 'publish' ORDER BY wp.post_date desc limit 2"); // change limit to show more posts

    while ($wp_post = mysql_fetch_array($wp_post_query)) {
    $code_array = array(
    "#\[.+\]#siU",
    "#\<.+\>#siU"
    );
    $postContent = preg_replace($code_array, '',$wp_post['post_content']);
    //$postContent = preg_replace("/[^ ]*$/", '', substr($postContent, 0, 110)); // limits content of each post to 110 chars
    $postContent = preg_replace("/[^ ]*$/", '',$postContent);
    echo '<h4>' . $wp_post['post_title'] . '</h4>';
    echo '<div class="postContent">' . $postContent . '...</div>';
    }
    ?>

    tested with WP2.8 and as far as I remember with 2.6

    hope it helps

    Thread Starter vivithemage

    (@vivithemage)

    Anything that I should add/change?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘integrate blog into current website?’ is closed to new replies.