Support » Developing with WordPress » image attachment for hello world using starter content

  • I’m developing a theme that supports starter content.I want to add an attachment image to the post “Hello world!” to show as a featured image using starter content.Problem is I cant figure out which array to use to add this attachment image.

    e.g ‘hello-world’ => array(
    ‘post_type’ =>’post’,
    ‘thumbnail’ => ‘{{sample0-featured-image}}’,)

    ‘hello-world’ doesn’t work!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Moderator bcworkz

    (@bcworkz)

    Wild speculation on my part, I’ve not confirmed this, but perhaps the reason you have trouble with hello-world is because the post already exists in new installations. Perhaps the starter content routine cannot update existing content, maybe starter content must be created anew? If you can add new starter content not titled hello world, I might be correct in this.

    You could add featured images to existing posts in the theme activation hook, bypassing the entire starter content routine, but that would be rather hacky and not consistent with the purpose of starter content.

    Thanks guys!…I appreciate the time. @jcastaneda, the resources you have pointed me to are the ones I used as head-start for adding Starter content.
    @bcworkz, Still not willing to dump starter content for theme activation hooks 🙂
    Its juz so simple, and I like simple. Anything else please?…before I resort to using hooks!…

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    If memory serves me right, I want to say posts is what needs to be worked on next. I remember seeing a comment in the code about making posts work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.