Is there a plugin for template post

Discussion in 'WordPress' started by dreteh, Feb 25, 2010.

  1. #1
    Hello,

    I understand that we can insert any html tags in a post body to arrange a layout of a post. But here is an issue I am having:

    Let's say all my posts have the format of picture first then description. What if in the future I want to change the format to description first then pictures. I don't think go back and edit all the posts body is a very efficient way. Is there any plugins for wordpress to solve this kind of problems.

    I was thinking in the worst case scenario, I am just gonna create a new table structure that suits my requirements and write some php code to generate the post by reading from my new table. For example, I have one column for description and one column for picture's url. Then, the format of the post will be generated by my own php code.

    Thank you for reading.
     
    dreteh, Feb 25, 2010 IP
  2. dreteh

    dreteh Member

    Messages:
    514
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33
    #2
    I solved the problem and this is just FYI.

    I insert all the data I want into the post body and seperated by delimiters. Then, I read the content by doing $content = get_the_content(); instead of the_content(). I explode the content in to an array by my delimiter. And I got an array of my data back =)
     
    dreteh, Feb 25, 2010 IP