• hi
    so i have a word press page coming along and i wish to link it to my home page which is not powered by word press. i have a section there titles recent blog posts, i want my most recent post to show in this section, how would i go about doing this?

    thanks in advance guys!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter wazzaday

    (@wazzaday)

    thanks for that,i still have a problem then, iv rad through it all and added the php code mentioned to use wordpress features

    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, false);
    require(‘/……/header.php’);
    ?>

    and i receive the following error when i load the page:

    Server error
    The website encountered an error while retrieving http://www.pixel-void.com/homee.php. It may be down for maintenance or configured incorrectly.

    require('/....../header.php');

    this line is definitely wrong

    notice in the example it shows

    require('./wp-blog-header.php');

    so it links to the wrong file, and

    /....../

    is also not going to work…. how many directories are you trying to navigate?

    Thread Starter wazzaday

    (@wazzaday)

    that was just an example, i checked the directories and tried that aswell.

    im going through /wp-blog-header.php

    sorry if im being a noob, started wordpress from scratch last week

    you don’t link to

    /blog/wp-content/themes/twentyten/header.php

    you just link to wp-blog-header.php

    it’s a core file which resides in the WordPress root directory, looks like that is blog on your install

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

    here’s another article, the one I used when I linked my non WP site

    Thread Starter wazzaday

    (@wazzaday)

    ok thanks ill get to it!

    Thread Starter wazzaday

    (@wazzaday)

    ok i tried that, i installed wordpress in the directory ‘blog’.

    <?php
    // Include WordPress
    define(‘WP_USE_THEMES’, false);
    require(‘./blog/wp-load.php’);
    query_posts(‘showposts=1’);
    ?>

    throws up the same error

    i have one file in my main directory called header.php and all the other pages include that. just in case that may be the cause of the problem.

    Thread Starter wazzaday

    (@wazzaday)

    ok sorted now. i had the first part of the code in the header file and the second in the page i wanted to display the post, as the header is included in that page i figured it would work, but it wouldnt.

    Glad you got it sorted. Seems including WP can be a bit flaky. I had the header code on my non WP page at the very top, and the page would not load, just a blank page. Moved it down just above the </head> tag and everything worked.

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

The topic ‘how to link to wordpress powered page’ is closed to new replies.