• I would like to find a plug-in or even some tutorials on coding that would allow a picture to be inserted into a new post based on the category. For instance, if I have a category called “ghosts”, whenever I make a new post with that category, it would automatically insert the ghost category pic into the post. I hope that made sense.

    Does anyone know of a plug-in or coding that would accomplish this?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would like to find a plugin like this too. Anyone?

    You’re looking for something like Slashdot (all posts in the same category get the same category image displayed)?

    If that’s the case, I’d recommend doing something in your actual theme pages rather than inserting the image into each new post. That way, if you ever want to change the category picture, or change a post’s category, the change will not require manually altering the image.

    To do it you basically just need to add to your loop, in pseudocode:

    if post_cat=X {
    echo '<img src="http://www.picturefor.com/x.gif">'
    }

    That’s a very crude version, my coding muscles have atrophied. Hope it’s at least a little helpful.

    Thread Starter cartooncool

    (@cartooncool)

    Thank you for the info. I will give it a try and see if I can get it to work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin to automatically insert pictures into posts based on category?’ is closed to new replies.