• My first post on these fora. ??

    I need to include(); wordpress into a larger site. I stripped down the template index.php file to what I needed, and the include() works fine… almost!

    Everything is included, except the most important bit of them all: the post content! I can’t explain there two things:

    1. opening the wordpress files directly everything works fine
    2. using the_excerpt() instead works too

    Is the_content() non-includable?

    Thanks in advance ??

    P.s. please excuse my poor english…

Viewing 6 replies - 1 through 6 (of 6 total)
  • How are you “including” WordPress itself in your document? Are you performing an include on wp-blog-header.php before incorporating any template tags, etc?

    Thread Starter haZe

    (@haze)

    I’m including wordpress/index.php . I’ve obviously changed che include path towards wp-blog-header.php to reflect the new condition.

    The really bizarre thing is that everything works (from post title, to author, etc.) except the_content()

    Thread Starter haZe

    (@haze)

    Any ideas? ??

    Only if were not properly including wp-blog-header.php. Once that’s available all of WordPress’ functionality should be, including post content.

    As a test, try this in your file where the post is being displayed:

    <?php echo $post->post_content; ?>

    Thread Starter haZe

    (@haze)

    Hey, cool! Works fine. ??

    I think that I don’t need the other extras of the actual function, so I’ll be fine with this hack. Doesn’t explain the problem though…

    Thanks again. ??

    I think you need to call wp-blog-header.php inside your page before you use an include for other stuff…. seems like I had to use the include line in index.php before running CG-Feedread later in the page when I was using it….

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘the_content() mysterious behaviour’ is closed to new replies.