WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] can i add a post from my blog to an indepent non blog website (8 posts)

  1. ericbarn
    Member
    Posted 4 years ago #

    i don't know if this is possible but ..
    i would like to show a new post from my blog on another independent site, can this be accomplished and how, if so? the only way i can think of is to add a url link on my site to the blog.
    if there's another way please let me know how to do it.
    thanks for any help,
    E.

  2. MichaelH
    Member
    Posted 4 years ago #

  3. ericbarn
    Member
    Posted 4 years ago #

    have tried the following added this code to a blank php page and nothing shows up:

    <table width="55%" border="1" cellspacing="3" cellpadding="2">
    <tr>
    <td><?php
    require('./new_site/wppress/wordpress/wp-blog-header.php');
    ?>
    <!-- Get the last 3 posts.-->
    <?php
    require('./new_site/wppress/wordpress/wp-blog-header.php');
    ?>

    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>
    <?php endwhile;?>
    can someone help. i pulled the code from the previous post's suggestion.
    Thanks for any help.

  4. MichaelH
    Member
    Posted 4 years ago #

    So the site you are working on is in on the same server, under the same folder as the other site you are extracting the data from?

  5. ericbarn
    Member
    Posted 4 years ago #

    yes ..that's correct.
    E.

  6. ericbarn
    Member
    Posted 4 years ago #

    this is the code from my index page of the site .. non blog: and i want to add a post to it from my blog. both are on the same server and in the root folder.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Temple Israel Ottawa</title>
    </head>
    <body class="oneColFixCtrHdr">
    <div id="blogcontent">
    <?php

    require('./new_site/wppress/wordpress/wp-blog-header.php');
    ?>
    <!-- Get the last 3 posts.-->
    <?php
    require('./new_site/wppress/wordpress/wp-blog-header.php');
    ?>

    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>
    <?php endwhile;?>
    </div>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="main.css" rel="stylesheet" type="text/css" />

    <!--[if lte IE 6]>
    <link rel="stylesheet" type="text/css" href="png_fix.css" />
    <![endif]-->

    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->

    `
    what am i doing wrong? i've saved this index page as a php file and nothing shows. i think it's a Div thing but not sure. a co worker coded the index page and i worked on wp. we are both volunteers for a church site. so we aren't making any money off of this site ..just experience and hard work; as you can see.
    if you can help it'd be appreciated. if this can't be done please let me/us know. thank you.

  7. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    http://www.corvidworks.com/articles/wordpress-content-on-other-pages

    I think the call to your wp_blog_header stuff needs to go in your <head> section?

    I do what you are trying to do on my website
    http://thevoodooempire.com/blog.php

    following the instructions I posted works like a charm for me (with minor modifications

  8. ericbarn
    Member
    Posted 4 years ago #

    thanks Rvoodoo. it worked like a charm. thank you
    E.

Topic Closed

This topic has been closed to new replies.

About this Topic