Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Chris Stauffer
Chris Stauffer
547 Points

Question about Custom Fields in WordPress

I'm building a site for a client that has a "Sponsors" page. The client wants to display a large number of sponsor logos. I've created a custom field "Partner Image" and assigned it to the page, but I'm confused on how to make it so the client can simply click "Add another Sponsor" to get an additional field and have that shown on the front-end.

2 Answers

Chris Stauffer
Chris Stauffer
547 Points

I'm already using ACF :) but thanks for the reply. It looks like what I'm trying to do requires the paid "Repeater Field" addon.

Hi Chris

There are a number of options you can use here which will give you a nice result and give your client an intuitive workflow also, but how its done depends on how you are with PHP really

Personally, I would suggest this plugin https://wordpress.org/plugins/meta-box/ - it require a little PHP to get up, but the repeatable fields look great and will do what you want with ease - however a less 'codey' approach could be this nifty plugin which can give you the repeatable fields and can be weaved into the front end with a shortcode

I hope this helps a little

Thanks, Danny

Chris Stauffer
Chris Stauffer
547 Points

I will look into Meta Box, thanks for the link. Did you mean to include a second link for the less 'codey' approach?