Support » Everything else WordPress » php for dynamic post titles/categories

  • Hi,

    What would I have to do to use some php to dynamically create post info such as title, category, etc.?

    What files would I need to edit?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your theme files, presumable. What are you trying to do?

    Thread Starter lockdownd7

    (@lockdownd7)

    Well right now I’m using php in the body of a post to generate a post of randomly selected content.

    So I need to be able to match the randomly generated post content with appropriate, corresponding title and category info, which would be simple enough if I knew where to put the code.

    I see that I can make those changes in the theme files, however, this doesn’t change the actual post title, just the output the surfer sees. Although that might not matter, I’m not completely sure. Where is the post title actually generated? I was thinking in wordpress’s post.php file but I couldn’t tell, there’s so many functions in use. :/

    Depending upon how you intend to use this – as the main Loop or as an additional loop, you might want to have a look at:

    http://codex.wordpress.org/Template_Tags/query_posts
    http://codex.wordpress.org/Template_Tags/get_posts

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php for dynamic post titles/categories’ is closed to new replies.