I developed a theme in which I show a Bootstrap carousel filled with sponsor images. At the moment the sponsor-images are hardcoded like this:

<div class="item active">
  <div class="row outerDiv">
    <div class="col-xs-12 innerDiv">
      <a href="<?php echo bloginfo('url'); ?>/recruiting-messe/"><img class="carImg img-responsive" src="<?php bloginfo('template_url')?>/images/Sponsoren/PremiumSponsoren.jpg" alt="Premium Sponsoren" style="margin: 0 auto;"></a>

I want my authors to be able to change the images without being required to dig into the code itself, but I don't know how to go about it. I thought about maybe retrieving images uploaded into the media library with a certain naming convention with a loop? Thanks in advance!

1 Answer 1


You are currently missing two parts: storage and interface.

And yes, it would make sense to handle this via media library, in which case you will probably be storing attachment IDs.

Storage is easy, Options API is trivial to use.

Interface is a little more involved. To this day WP doesn't quite provide a native way to easily build interfaces. Facilities provided are a bit low level.

You can use Settings API, but it's quite involved and doesn't get you all the way to form elements or media management.

You might want to search for existing frameworks/helpers, meant to implement settings pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.