How to create a post programatically?
I have a database table that I’d like to use as the source for some postings. Suppose a row of the table looks like this:
id=5 name=jack title=jack's dream content=i was flying around a lot.
When someone visits the page myblog.com/view.php?id=5 (or whatever), I’d like to display a blog post that looks like this:
Jack's Dream by Jack I was flying around a lot.
I’d like this to be like any other blog posting, with the ability for viewers to add comments.
And if I change the data in the database table, the page should reflect that. In other words, the data would be live, as opposed to being transferring to the main blog postings table.
- The topic ‘How to create a post programatically?’ is closed to new replies.