• OK, first off this is not a ploy to get traffic to my site. It is however the only way I could figure out how to explain what I am looking for. Look at https://webnewsfeed.com/, there you will see snipets from post made to a previous blog I had, however I had to physically type each snipet into the php page linking it back to the post on the blog.

    What I am looking for is a plugin that will automatically pull a snipet from each post as it is made and place it into a php page outside the blog software directory linking it back to the blog post. I would like to be able to control how many snipets are displayed. That way people viewing my website home page will be able to see the most recent post and hopefully peak their interest enough for them to go to the blog.

    Anything out there like this or am I shouting into the wishing well?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter codi

    (@codi)

    I set up a php page just as described:-

    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, false);
    require(‘/home/webnews/public_html/blog/wp-content/themes/news-magazine-theme-640/header.php’);
    ?>

    <?php
    $posts = get_posts(‘numberposts=10&order=ASC&orderby=post_title’);
    foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(); echo “
    “; ?>
    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    <?php
    endforeach;
    ?>

    and I get this error message:-

    Fatal error: Call to undefined function language_attributes() in /home/webnews/public_html/blog/wp-content/themes/news-magazine-theme-640/header.php on line 2

    so far, I have not been able to figure out the problem. Any help would be greatly appreciated.

    Codi

    Try:

    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');
    Thread Starter codi

    (@codi)

    Tried that….didn’t work either <:(

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘export post snipet to static php page’ is closed to new replies.