• Hi there, i’ve gone through
    http://codex.wordpress.org/Integrating_WordPress_with_Your_Website
    and then stuck at a point where, when clicked on the archived post titles within the sidebar, the page is jumping into /blog (wordpress site) folder.. rather than staying in the current page and populating the content-div with required selection(archive post).

    Am planning to echo single.php file, but getting an error with post.php file and further..

    Any helps, appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sounds like exactly what should be happening in the absence of some clever code trickery. Exactly how are you trying to do this– “rather than staying in the current page and populating the content-div with required selection(archive post).”?

    Thread Starter desibird

    (@desibird)

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');
    query_posts('showposts=1');
    ?>

    posting the above code in the top of the page(html) and then, within the required div, add side-bar <?php get_sidebar(); ?>

    Coming to the content div, managed to pull the latest post and then placing within the content div. code for the following

    <div class="the-center">
    <?php while (have_posts()): the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <i> <?php the_time('F jS, Y') ?></i>
    <p><?php the_content(); ?></p>
    <?php endwhile; ?>
    </div>

    .

    Am stuck at the point, where, when clicked on side-bar(archived) titles, page is jumping into wordpress site, rather than staying in the same page and retrieve the required post..!!

    any help appreciated!

    Most of WP’s internal functions assume the WP pseudo-directory structure. The same is true of plugins. I don’t think you are going to be able to use any of those, at least not the ones that spit out links.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘displaying single.php on external html/php page’ is closed to new replies.