• I am looking for a way to include an automatically updated list of posts in a page on another website. PHP code that accesses the appropriate part of the WordPress database on my site would work, or a way of creating a page in the WordPress site itself that has just the list of posts and nothing else could work too. With the latter option, I could then use an include or CURL statement on the other site to display the list.

    Thanks.

    Robert

Viewing 9 replies - 1 through 9 (of 9 total)
  • Will parsing the RSS feed work?

    When the second site is also using WordPress, I use the feedlist plugin.

    In the more general case, see nc-wu.org/news.php, source at nc-wu.org/news.phps. [In that example, aauwnc.org and rwc.aauwnc.org are running WordPress.]

    Thread Starter RobertAbrams

    (@robertabrams)

    I was able to use the source of the more general case that you suggested to create a workable result. Some examples are below.

    https://www.marcygross.com/blog/randomfeedlistexample2.php
    https://www.marcygross.com/blog/randomfeedlistexample.php

    However, the FeedList option didn’t work. I get various php errors whether I include the feedlist.php file in the file I created or not.

    https://www.marcygross.com/blog/marcyfeedlist.php

    Suggestions?

    This is progress, so thank you.

    Robert

    Thread Starter RobertAbrams

    (@robertabrams)

    I now have a way of displaying a list of posts within a page, but I need to display just the list of posts. Anyone have any idea how to display a page so that everything but the page contents is stripped out?

    There really has to be a better way.

    How do I find someone I can hire to help me with this?

    Thanks.

    Robert

    theapparatus

    (@theapparatus)

    Yup. Create a Page template with just the required bit at the top to id it as a page template and the function call that you need for the contents.

    Example:

    <?php
    /*
    Template Name: Snarfer
    */
    ?>
    
    <?php
    my_function_call();
    ?>

    Reference for creating Page Templates:

    https://codex.www.ads-software.com/Pages#Creating_your_own_Page_Templates

    Hope this helps

    Thread Starter RobertAbrams

    (@robertabrams)

    Where is this page template file supposed to go? I tried putting it in the default theme folder, but nothing happened.

    Thanks.

    Robert

    theapparatus

    (@theapparatus)

    You put it in the theme folder of the theme that you’re currently using. When you create the Page, look for your Page Template under the tab along the right hand side.

    Thread Starter RobertAbrams

    (@robertabrams)

    This time it worked.

    Thanks.

    Robert

    theapparatus

    (@theapparatus)

    Not a problem. ??

    We actually do this trick on static sites with an iframe when using RSS isn’t an option.

    Reading the above again, I think the examples on the page for the get_posts Template Tag would suit your purposes better than either of my initial suggestions. [Just in case someone else finds this thread. Apologies for disappearing…]

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Including a list of posts in another website’ is closed to new replies.