• Hi forum,

    I’m using WordPress to set up a web comic, which will consist of many posts differing in only one detail. For example, a page might follow this schema:

    image-tag source = issue_number_XYZ.jpg

    Where the issue number will change in subsequent posts, but nothing else. Is there any feature or method that can help me automate this process? I know some basic perl and could figure out any reasonable scripting language, but don’t know how to interface with WP via any means other than the standard browser interface.

    Thanks in advance!

    Mike

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m not sure I get exactly what you’re looking for, but one feature that could help you is the Custom Fields in WordPress, combined with the Get Custom Fields plugin.

    I use this with a field called “Link To Mp3”, and every time I make a post, I put the URL to the mp3 in that custom field.

    In my Single Post Template (this is the code in my theme that displays the post, NOT the body of the post itself), I have basically a code like this:
    <a href=" [GET CUSTOM FIELD PLUGIN: Get Link To mp3]"> Download the mp3 of [POST TITLE] </a>"

    So effectively, I need only make a new post, and paste in the URL in my custom field… then the post appears with the link already created, and the hyperlink states the post title.

    Perhaps you would make 1 skeleton-post with your usual content and the line of code
    <img src="http://mysite.com/images/[GET CUSTOM FIELD PLUGIN: get Issue Number].jpg">

    then each time you have a new comic, you make a Post and copy-paste your usual content, type the Issue Number in the custom field, and Publish.

    Does that address your wish?

    Thread Starter MikeShapiro

    (@mikeshapiro)

    Thanks for the response, DGold.

    Your solution sounds like it would work for new posts. But what I’m hoping to do is create a large number of “old” posts (in this case, back issues of the comic), whose contents are algorithmically generated. (Specifically, each containing a link to an issue, where the issue number is the only thing that changes.)

    I can’t help but think that the easiest way to do this is to use some scripting language (e.g. Perl) to generate WordPress posts, rather than type them in by hand in the browser window. Do you happen to know if this can be done?

    I know for a programmer type it makes sense to do it auto-magically, like that. Are we talking 100 comics, or more? If it was less than 100 posts I’d probably just do it by hand with cut-and-paste and changing the 1 variable, or hire someone to do the busy work. That answer is probably because I wouldn’t have a clue how to script it.

    Thread Starter MikeShapiro

    (@mikeshapiro)

    It’s a lot of comics. 🙂

    Do you happen to know where WordPress stores its posts? I couldn’t find any obvious location in its file hierarchy. If I could see that, I might be able to figure it out.

    WP stores it’s posts in the database, that’s why you can’t find them in the file heirarchy. But image files are stored in wp-content/images

    HTH 🙂

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

The topic ‘Multiple automatic posts?’ is closed to new replies.