Skip to content
Custom fields for WordPress that are quick to build and quick to load. Get Pro

Recipes

Copy it. Change two words. Ship it.

32 short, working answers for the jobs you do every week (a team list, an announcement bar, a filtered product list) and 5 projects you build from start to finish.

Build something real

Projects take several steps and end with something that works.

All recipes

A hero with an optional button A headline, a picture and a button that only shows when the editor fills it in. Content on the page · 1 min Show something only when a switch is on A Yes / No switch that shows or hides a banner, with no extra code. Content on the page · 1 min A responsive image with the right alt text Print an image with its sizes and the alt text the editor wrote. Content on the page · 1 min An image as a CSS background Use an image field as the background of a section. Content on the page · 1 min A gallery grid Print a gallery as a responsive grid. Content on the page · 1 min A team list A repeater of people: name, role, photo and bio, printed as cards. Content on the page · 1 min An FAQ, with structured data Questions and answers on the page, and the same ones as structured data for search engines. Content on the page · 1 min Social links from an options page Edit your social links once, in options, and print them anywhere. Site-wide things · 1 min A site-wide announcement bar A bar at the top of every page, switched on and off from the admin. Site-wide things · 1 min A footer menu chosen in the adminPro Let the editor pick which menu goes in the footer. Site-wide things · 1 min A table of pricesPro A table the editor fills in, printed as a real HTML table. Lists and data · 1 min Related posts picked by handPro Pick related posts by hand and print them under the article. Lists and data · 1 min Upcoming events, sorted by date A list of future events, soonest first, from a date field. Lists and data · 1 min A product list, filtered and sorted Filter products by stock and color, and sort them by price. Lists and data · 1 min Posts of one author, from a relation Books and authors related in both directions, with one field. Lists and data · 1 min A landing page made of blocksPro Flexible content: the editor stacks hero, text, gallery and call-to-action in any order. Sections and media · 1 min A color field as a CSS variable A color picked in the admin becomes a CSS variable on the page. Sections and media · 1 min A class on the body, from a field A select field that adds a class to the body, for light and dark pages. Sections and media · 1 min A video that loads when clickedPro An embed that shows a poster and loads the player only on click. Sections and media · 1 min Structured data for an event Print Event structured data from the date and venue fields. Structured data and templates · 1 min A link that opens in a new tab, safely A link field printed with the right target and rel attributes. Structured data and templates · 1 min A row passed to a template part Pass one row of a repeater to get_template_part() as a variable. Structured data and templates · 1 min Counting rows, and the first and last Count rows and treat the first and last differently, with plain PHP. Structured data and templates · 1 min Writing a value from code Save a value from code with the same cleaning an editor's value gets. Code and automation · 1 min Adding a row to a repeater from code Read the rows, add yours and write the list back. Code and automation · 1 min Copying a field on save Copy one field into another every time a post is saved. Code and automation · 1 min A bulk change with WP-CLI Fill the gaps in a field for every post with one terminal command. Code and automation · 1 min A value inside the content, with the shortcode Put a field's value inside the text of a page with a shortcode. Beyond the theme · 1 min A list of posts in Query Loop, with no codePro Show each post's own fields in a Query Loop, with Block Bindings. Beyond the theme · 1 min A contact form that saves messagesPro A form on the site that saves each message as a post. Beyond the theme · 1 min Hiding a layout on one sitePro One theme, three sites, and one of them must not offer a layout. Beyond the theme · 1 min Different text for each languagePro One field, a different value in each language, with Polylang. Beyond the theme · 1 min

New to UglyFields?

Put your first field on a page in three minutes, then come back for the recipes.