• Hi, all,

    I’m using WordPress for my personal blog. In addition to WP, my web page has some original HTML and PHP content and a Wiki site. I manually edit an HTML page on my home page to list content that has been added to my site. I would like to automate this process, if possible.

    Ideally, I’d like to add a category to my blog called ‘news’. I would then like to add some PHP code to my home page that shows the ‘n’ most recent items in the ‘news’ category. I’ll want to get the date of the topic, the topic title, and a URL to the topic. I’ll use these data to create a table of recent ‘news’ items with links to the topic.

    Can anyone help me with this? Where can I learn as to what PHP code can be used to retrieve topics based on category? How can I retrieve the date of the item? Is there a WordPress API that I can use to simplify this or will I have to dig around the source and copy functionality? What is the easiest way to do this?

    Thanks!
    Scott

Viewing 4 replies - 1 through 4 (of 4 total)
  • There a Plugin API, lots of WordPress Lessons which might help.

    There’s also a plugin to make a WordPress Page act as your front page.

    Thread Starter drummonds

    (@drummonds)

    Thank you for taking the time to reply. I spent the last 20 minutes inspecting the documentation at all four links you provided but I’m afraid that it was either impractical or too detailed for me to understand.

    How about this: can you (or anyone) name the PHP functions that I should use to query topics by category? How can I get the topics’ dates? This little bit of info should enable me to write my own PHP to solve my problem.

    Thanks,
    Scott

    Search for “query_post” and you’ll find several threads about this topic.

    it’s not as simple as using a WP function in your PHP pages.

    In order to use (almost) any of the WP functions, you’ll need to
    include ('/path/to/wp-blog-header.php');
    to prepare all the WP infrastructure for use. Then, once you’ve done that, you can start using WP functions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using Blog Content Outside of WordPress’ is closed to new replies.