<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WordPress Custom Fields Archives | Effortless Custom Fields</title>
	<atom:link href="https://ecfwp.com/category/wordpress-custom-fields/feed/" rel="self" type="application/rss+xml" />
	<link>https://ecfwp.com/category/wordpress-custom-fields/</link>
	<description>World’s least confusing custom fields plugin</description>
	<lastBuildDate>Tue, 23 Apr 2024 11:30:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://ecfwp.com/wp-content/uploads/2023/08/cropped-fav-icon-1-32x32.png</url>
	<title>WordPress Custom Fields Archives | Effortless Custom Fields</title>
	<link>https://ecfwp.com/category/wordpress-custom-fields/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Which other WordPress Plugins have repeater fields like ACF repeater?</title>
		<link>https://ecfwp.com/wordpress-custom-fields/which-other-plugins-have-repeater-fields-like-acf-repeater/</link>
					<comments>https://ecfwp.com/wordpress-custom-fields/which-other-plugins-have-repeater-fields-like-acf-repeater/#respond</comments>
		
		<dc:creator><![CDATA[Paras Ralhan]]></dc:creator>
		<pubDate>Fri, 16 Feb 2024 11:43:06 +0000</pubDate>
				<category><![CDATA[WordPress Custom Fields]]></category>
		<category><![CDATA[ECF Premium]]></category>
		<category><![CDATA[Layout Field]]></category>
		<category><![CDATA[Meta Box]]></category>
		<category><![CDATA[Repeater Field]]></category>
		<guid isPermaLink="false">https://ecfwp.com/?p=4190</guid>

					<description><![CDATA[<p>Repeater fields are great to create repeatable stuff that you want to present on your site. For example: team, slider, events, cards, videos, etc. For content that you need to present only as looped—that don’t need an independent page—Repeater Fields are perfect for such content type.</p>
<p>The post <a href="https://ecfwp.com/wordpress-custom-fields/which-other-plugins-have-repeater-fields-like-acf-repeater/">Which other WordPress Plugins have repeater fields like ACF repeater?</a> appeared first on <a href="https://ecfwp.com">Effortless Custom Fields</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="large medium">Repeater fields are great to create repeatable stuff that you want to present on your site. For example: team, slider, events, cards, videos, etc.</p>



<h2 class="wp-block-heading">When to use Repeater Fields</h2>



<p><strong>For content that you need to present only as looped—that don’t need an independent page of its own—use repeater fields. </strong>They are perfect for such content type. If you don’t use repeater fields, you have to create a separate Post-Type for each content-type that you want to repeat in your templates. Post-Types works but they are not the correct solution for such content. They are messy to manage. Post-Types should only be used when you are going to have its independent or detail page. Examples are: Blog Posts, Pages, News, Press Releases etc.</p>



<h2 class="wp-block-heading">Why Repeater Fields are great</h2>



<ul class="wp-block-list">
<li>Everyone, along with your clients love clean and perfect solution. Repeater Fields help you keep your WordPress admin clean by not registering unnecessary Post-Types for content-types that only loops and doesn’t need an independent page.</li>



<li>Post Type solution becomes super-messy when each of your post, page, team member need something repeating that is specific to each of them. For example: you need to display books written by author on author page.</li>



<li>Clients mostly don’t need much explanation with repeater fields.</li>
</ul>



<h2 class="wp-block-heading">Plugins that offer Repeater Fields other than ACF repeater:</h2>



<p>Repeater fields are normally found in PRO version of most plugins. Each plugin presents its own way to create such fields.</p>



<h3 class="wp-block-heading">1. <a href="https://ecfwp.com/">Effortless Custom Fields Premium</a></h3>



<p>Creating Repeater fields in ECF Premium is extremely simple. <strong>Click on Field Type,</strong> and <strong>select</strong> <strong>Repeater Field</strong> under <strong>Layout Fields. </strong>After selecting, you will get an option to enter <strong>Section Label; </strong>this is default label you want to give to a newly created section and the label of button that creates a new section when clicked. For example, if you want to create a slider: you’ll enter <strong>“New Slide”</strong> for Section Label. Button label will become <strong>“+ New Slide.” </strong>See screenshots:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69d0cde434ff2&quot;}" data-wp-interactive="core/image" data-wp-key="69d0cde434ff2" class="wp-block-image size-full wp-lightbox-container"><img fetchpriority="high" decoding="async" width="1500" height="1962" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-ECF-Premium.png" alt="How to Create Repeater Field in ECF Premium" class="wp-image-4191" srcset="https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-ECF-Premium.png 1500w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-ECF-Premium-229x300.png 229w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-ECF-Premium-783x1024.png 783w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-ECF-Premium-768x1005.png 768w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-ECF-Premium-1174x1536.png 1174w" sizes="(max-width: 1500px) 100vw, 1500px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69d0cde4356a2&quot;}" data-wp-interactive="core/image" data-wp-key="69d0cde4356a2" class="wp-block-image size-full is-style-default wp-lightbox-container"><img decoding="async" width="1500" height="1966" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://ecfwp.com/wp-content/uploads/2024/02/Showing-Repeater-Field-in-ECF-Premium-Docs-Section-1.png" alt="Repeater Field in ECF Premium Docs Section" class="wp-image-4193" srcset="https://ecfwp.com/wp-content/uploads/2024/02/Showing-Repeater-Field-in-ECF-Premium-Docs-Section-1.png 1500w, https://ecfwp.com/wp-content/uploads/2024/02/Showing-Repeater-Field-in-ECF-Premium-Docs-Section-1-229x300.png 229w, https://ecfwp.com/wp-content/uploads/2024/02/Showing-Repeater-Field-in-ECF-Premium-Docs-Section-1-781x1024.png 781w, https://ecfwp.com/wp-content/uploads/2024/02/Showing-Repeater-Field-in-ECF-Premium-Docs-Section-1-768x1007.png 768w, https://ecfwp.com/wp-content/uploads/2024/02/Showing-Repeater-Field-in-ECF-Premium-Docs-Section-1-1172x1536.png 1172w" sizes="(max-width: 1500px) 100vw, 1500px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>
</div>
</div>



<p><strong>Pros:</strong></p>



<ul class="wp-block-list">
<li>Extremely simple, clean, and beautiful.</li>



<li>Fields containers are collapsible. It keeps interface clean and help user focus.</li>



<li>You can disable any section that you don’t want to output in your templates for a while.</li>



<li>You can reorder sections whenever you want.</li>



<li>You can change section label for easy reference.</li>
</ul>



<p><strong>Cons:</strong></p>



<ul class="wp-block-list">
<li>You can’t change the fields layout. They appear one after the other.</li>



<li>Not great for entering huge dataset.</li>



<li>No multi-level nesting.</li>
</ul>



<h3 class="wp-block-heading">2. <a href="https://metabox.io/" target="_blank" rel="noreferrer noopener">Meta Box</a></h3>



<p>They use different name for repeater: Meta Box Group. It comes as an extension to their PRO plugin: Meta Box. Creating New Meta Box Group in PRO plugin is simple as selecting the Field-Type = Meta Box Group, and adding subfields to it. They don’t give any option to edit the Section Label in the interface. You have to dig through their docs to find how to handle it through code. Screenshots:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69d0cde435b97&quot;}" data-wp-interactive="core/image" data-wp-key="69d0cde435b97" class="wp-block-image size-full wp-lightbox-container"><img decoding="async" width="1500" height="1042" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-MetaBox.png" alt="How-to-Create-Repeater-Field-in-MetaBox" class="wp-image-4194" srcset="https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-MetaBox.png 1500w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-MetaBox-300x208.png 300w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-MetaBox-1024x711.png 1024w, https://ecfwp.com/wp-content/uploads/2024/02/How-to-Create-Repeater-Field-in-MetaBox-768x534.png 768w" sizes="(max-width: 1500px) 100vw, 1500px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69d0cde435e76&quot;}" data-wp-interactive="core/image" data-wp-key="69d0cde435e76" class="wp-block-image size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="629" height="823" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://ecfwp.com/wp-content/uploads/2024/02/Meta-Box-Group-in-Meta-Box-Pro-Bundle.png" alt="Meta-Box-Group-in-Meta-Box-Pro-Bundle" class="wp-image-4195" srcset="https://ecfwp.com/wp-content/uploads/2024/02/Meta-Box-Group-in-Meta-Box-Pro-Bundle.png 629w, https://ecfwp.com/wp-content/uploads/2024/02/Meta-Box-Group-in-Meta-Box-Pro-Bundle-229x300.png 229w" sizes="auto, (max-width: 629px) 100vw, 629px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>
</div>
</div>



<p><strong>Pros:</strong></p>



<ul class="wp-block-list">
<li>Groups are collapsible and reorderable.</li>



<li>Multi-level nesting supported.</li>



<li>You can display fields within group in any number of columns with another extension: Meta Box Columns.</li>
</ul>



<p><strong>Cons:</strong></p>



<ul class="wp-block-list">
<li>Design is pretty basic.</li>



<li>Plugin cost is high. Each extension puts additional load on budget.</li>



<li>Groups can’t be disabled.</li>
</ul>



<h3 class="wp-block-heading">3. <a href="https://wordpress.org/plugins/pods/" target="_blank" rel="noreferrer noopener">Pods</a></h3>



<p>Pods don’t have their own repeater field—that could hold any numbers of subfields. They only have an option to make any field repeatable; no-nesting. To enable repeatable fields in Pods, you need to use another plugin: <strong><a href="https://wordpress.org/plugins/panda-pods-repeater-field/" target="_blank" rel="noreferrer noopener">Panda Pods Repeater Field</a>. </strong>This plugin does the job but its pretty messy to setup.</p>



<p>First you have to create some Advanced Content Type. Let’s say You create <strong>Slider</strong> as plural and <strong>Slide</strong> as Singular. After that you will land on <strong>Manage Fields Tab</strong>. Delete fields not required. Add fields that you want.</p>



<p>Now Go to <strong>Edit Pods</strong> and <strong>select the Post Type</strong> where you want this repeater field to appear. In <strong>Manage Fields, </strong>add New Field of the type <strong>Pods Table as Repeater Field</strong>.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Panda Pods Repeater Field - Basic Use" width="500" height="281" src="https://www.youtube.com/embed/8oUeROi62o8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Plugin video will help you understand more. For going through quickly, play at: x1.75 of normal speed.</figcaption></figure>



<p><strong>Pros:</strong></p>



<ul class="wp-block-list">
<li>Separate table option to save repeater fields at some other place for performance.</li>



<li>Can load fields in multiple columns—though configuring is complex.</li>



<li>Free</li>
</ul>



<p><strong>Cons:</strong></p>



<ul class="wp-block-list">
<li>No option to disable section.</li>



<li>Complex to understand.</li>



<li>Presentation is very poor—not professional.</li>
</ul>
<p>The post <a href="https://ecfwp.com/wordpress-custom-fields/which-other-plugins-have-repeater-fields-like-acf-repeater/">Which other WordPress Plugins have repeater fields like ACF repeater?</a> appeared first on <a href="https://ecfwp.com">Effortless Custom Fields</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ecfwp.com/wordpress-custom-fields/which-other-plugins-have-repeater-fields-like-acf-repeater/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are Custom Fields in WordPress?</title>
		<link>https://ecfwp.com/wordpress-custom-fields/what-are-custom-fields-in-wordpress/</link>
					<comments>https://ecfwp.com/wordpress-custom-fields/what-are-custom-fields-in-wordpress/#comments</comments>
		
		<dc:creator><![CDATA[Paras Ralhan]]></dc:creator>
		<pubDate>Thu, 15 Feb 2024 12:01:00 +0000</pubDate>
				<category><![CDATA[WordPress Custom Fields]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[Metabox]]></category>
		<guid isPermaLink="false">https://ecfwp.com/?p=4163</guid>

					<description><![CDATA[<p>Custom Fields in WordPress refers to any input field—it can be of the type: text, textarea, dropdown, checkbox, checkboxes, gallery, date, time, etc.— that can hold some custom data related&#8230; </p>
<p class='read-more'><a href='https://ecfwp.com/wordpress-custom-fields/what-are-custom-fields-in-wordpress/' title='Read More about What are Custom Fields in WordPress?' class='read-more' data-toggle='tooltip' data-placement='right' >Read More <i class='fa fa-angle-double-right' aria-hidden='true'></i></a></p>
<p>The post <a href="https://ecfwp.com/wordpress-custom-fields/what-are-custom-fields-in-wordpress/">What are Custom Fields in WordPress?</a> appeared first on <a href="https://ecfwp.com">Effortless Custom Fields</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="large">Custom Fields in WordPress refers to any input field—it can be of the type: <strong>text</strong>, <strong>textarea</strong>, <strong>dropdown</strong>, <strong>checkbox</strong>, <strong>checkboxes</strong>, <strong>gallery</strong>, <strong>date</strong>, <strong>time</strong>, etc.— that can hold some custom data related to post, page, category, or any other type of content. The data that goes into these custom fields can be fetched with utility functions provided by WordPress.</p>



<p class="large">Clients always love to have a separate place to enter their custom data. By creating custom fields for them, you empower your clients to control their content without messing up its presentation.</p>



<h2 class="wp-block-heading">Three ways to create Custom Fields</h2>



<ol class="smooth-scroll wp-block-list">
<li><a href="#inbuilt-custom-fields" data-type="internal" data-id="#inbuilt-custom-fields">Through WordPress Inbuilt Custom Fields</a></li>



<li><a href="#through-custom-coding">Through Custom Coding</a></li>



<li><a href="#through-plugins">Through Plugins</a></li>
</ol>



<h3 class="wp-block-heading h2" id="inbuilt-custom-fields">Through WordPress Inbuilt Custom Fields</h3>



<p>These are available only for post types (if supported) and not for any other content type. For categories, tags, taxonomies, profile, customizer, you have to create custom fields by next two methods.</p>



<p><strong>How to make inbuilt custom fields visible: </strong>follow steps as shown below:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69d0cde43800d&quot;}" data-wp-interactive="core/image" data-wp-key="69d0cde43800d" class="wp-block-image size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="1500" height="914" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://ecfwp.com/wp-content/uploads/2024/02/enable-wordpress-inbuilt-custom-fields.jpg" alt="3 Steps to make inbuilt custom fields visible" class="wp-image-4164" srcset="https://ecfwp.com/wp-content/uploads/2024/02/enable-wordpress-inbuilt-custom-fields.jpg 1500w, https://ecfwp.com/wp-content/uploads/2024/02/enable-wordpress-inbuilt-custom-fields-300x183.jpg 300w, https://ecfwp.com/wp-content/uploads/2024/02/enable-wordpress-inbuilt-custom-fields-1024x624.jpg 1024w, https://ecfwp.com/wp-content/uploads/2024/02/enable-wordpress-inbuilt-custom-fields-768x468.jpg 768w" sizes="auto, (max-width: 1500px) 100vw, 1500px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<p><strong>Where they show up: </strong>see below:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69d0cde43831f&quot;}" data-wp-interactive="core/image" data-wp-key="69d0cde43831f" class="wp-block-image size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="1500" height="1026" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://ecfwp.com/wp-content/uploads/2024/02/wordpress-inbuilt-custom-fields.png" alt="WordPress Inbuilt Custom Fields appears at maked location" class="wp-image-4165" srcset="https://ecfwp.com/wp-content/uploads/2024/02/wordpress-inbuilt-custom-fields.png 1500w, https://ecfwp.com/wp-content/uploads/2024/02/wordpress-inbuilt-custom-fields-300x205.png 300w, https://ecfwp.com/wp-content/uploads/2024/02/wordpress-inbuilt-custom-fields-1024x700.png 1024w, https://ecfwp.com/wp-content/uploads/2024/02/wordpress-inbuilt-custom-fields-768x525.png 768w" sizes="auto, (max-width: 1500px) 100vw, 1500px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<h4 class="wp-block-heading h3">Pros and Cons of Inbuilt Custom Fields</h4>



<p><strong>Pros:</strong></p>



<ul class="wp-block-list">
<li>Available by default. Nothing extra need to be installed or done to create them.</li>
</ul>



<p><strong>Cons:</strong></p>



<ul class="wp-block-list">
<li>The inbuilt custom fields are pretty basic and limited. You can only save simple text data in them.</li>



<li>They make interface look messy.</li>



<li>You have to create these custom fields for each entity (post, page, etc.)</li>
</ul>



<h3 class="wp-block-heading h2" id="through-custom-coding">Creating fields through Custom Coding</h3>



<p>This is the most tedious way to create custom fields. If you are a programmer and you love to build custom solution for your clients, only then choose this route, otherwise prefer using some plugin. It is a lengthy process and it requires you to have understanding of PHP, WordPress, HTML, and CSS. Let’s see how to create custom fields for <strong>post_type = ‘post’</strong>.</p>



<p>WordPress has a concept of <strong>MetaBoxes</strong>. A <strong>MetaBox </strong>is a container that can hold any content, and we want it to hold our custom fields.</p>



<p>To create a MetaBox for <strong>post_type = ‘post’,</strong> see code below:</p>



<pre class="wp-block-code language-php"><code>&lt;?php
/**
 * ===============================
 * Register meta box(es).
 * ===============================
 */
add_action( 'add_meta_boxes', 'your_prefix_register_meta_boxes' );

function your_prefix_register_meta_boxes () {

	add_meta_box( 
		'meta-box-id', 
		__( 'Meta Box Label', 'textdomain' ), 
		'your_prefix_display_fields', 
		'post' 
	);
	
}</code></pre>



<h4 class="wp-block-heading">Use following code to render fields into this MetaBox:</h4>



<pre class="wp-block-code language-php"><code>&lt;?php
/**
 * ===========================================
 * Meta box display callback.
 *
 * @param WP_Post $post — Current post object.
 * ===========================================
 */
function your_prefix_display_fields( $post ) {

	// Add an nonce field so we can check for it later.
	wp_nonce_field( 'your_prefix_custom_box', 'your_prefix_custom_box_nonce' );

	// Use get_post_meta to retrieve an existing value from the database.
	$value = get_post_meta( $post-&gt;ID, 'your_prefix_first_custom_field', true );

	// Display the form, using the current value.
	?&gt;
	&lt;label for="your_prefix_first_custom_field"&gt;
		&lt;?php _e( 'Your First Custom Field', 'textdomain' ); ?&gt;
	&lt;/label&gt;
	
	&lt;input type="text" id="your_prefix_first_custom_field" name="your_prefix_first_custom_field" value="&lt;?php echo esc_attr( $value ); ?&gt;" /&gt;
	&lt;?php

}
</code></pre>



<h4 class="wp-block-heading">To save fields, use below code:</h4>



<pre class="wp-block-code language-php"><code>&lt;?php
/**
 * ===========================================
 * Save meta box content.
 *
 * @param int $post_id Post ID
 * ===========================================
 */
add_action( 'save_post', 'your_prefix_save_meta_box' );

function your_prefix_save_meta_box( $post_id ) {

	/*
	 * We need to verify this came from the our screen and with proper authorization,
	 * because save_post can be triggered at other times.
	 */

	// Check if our nonce is set.
	if ( ! isset( $_POST&#91;'your_prefix_custom_box_nonce'] ) ) {
		return $post_id;
	}

	$nonce = $_POST&#91;'your_prefix_custom_box_nonce'];

	// Verify that the nonce is valid.
	if ( ! wp_verify_nonce( $nonce, 'your_prefix_custom_box' ) ) {
		return $post_id;
	}

	/*
	 * If this is an autosave, our form has not been submitted,
	 * so we don't want to do anything.
	 */
	if ( defined( 'DOING_AUTOSAVE' ) &amp;&amp; DOING_AUTOSAVE ) {
		return $post_id;
	}

	// Check the user's permissions.
	if ( 'page' == $_POST&#91;'post_type'] ) {

		if ( ! current_user_can( 'edit_page', $post_id ) ) {
			return $post_id;
		}

	} else {

		if ( ! current_user_can( 'edit_post', $post_id ) ) {
			return $post_id;
		}

	}

	/* OK, it's safe for us to save the data now. */

	// Sanitize the user input.
	$your_first_field_value = sanitize_text_field( $_POST&#91;'your_prefix_first_custom_field'] );

	// Update the meta field.
	update_post_meta( $post_id, 'your_prefix_first_custom_field', $your_first_field_value );	

}</code></pre>



<h4 class="wp-block-heading">To get the field value in your template, use following code:</h4>



<pre class="wp-block-code language-php"><code>&lt;?php
$value = get_post_meta( get_the_ID(), 'your_prefix_first_custom_field', true );

// When you echo the value, use proper escaping, for eg.:
?&gt;
&lt;h3&gt;&lt;?php echo esc_html($value); ?&gt;&lt;/h3&gt;
&lt;?php</code></pre>



<h4 class="wp-block-heading h3">Pros and Cons of creating Custom Fields by Custom Coding</h4>



<p><strong>Pros:</strong></p>



<ul class="wp-block-list">
<li>Extreme Flexibility.</li>



<li>You learn in inner working of how custom fields works under the hood.</li>
</ul>



<p><strong>Cons:</strong></p>



<ul class="wp-block-list">
<li>A long and tedious process.</li>



<li>You have to handle security issues that itself is challanging.</li>



<li>Code you write should not conflict with others. You have to use your custom prefixes everywhere.</li>
</ul>



<h3 class="wp-block-heading h2" id="through-plugins">Creating fields through Plugins</h3>



<p>This is the most recomended way to create custom fields in your various WordPress admin screens. They let you build custom fields with tiny effort when compared to custom coding. There are lots of free WordPress plugins available in market that will solve most of your problems. </p>



<p>Each plugin comes with its own way of creating and managing custom fields. Most of Custom Field plugins has their Free and Pro versions. </p>



<h4 class="wp-block-heading">Below are some of the Custom Fields Plugins:</h4>



<ol class="wp-block-list">
<li><strong><a href="https://ecfwp.com/">Effortless Custom Fields</a>: </strong>This plugin is developed by our team, and we have done everything to remove all limitations that we experienced with other WordPress plugins available in the market. It has 32 free field types. Only one field—Repeater—is in PRO. The other things in PRO are layout fields: Accordion and Tabs. Effortlessness as promised is delivered. </li>



<li><a href="https://wordpress.org/plugins/advanced-custom-fields/" target="_blank" rel="noreferrer noopener nofollow"><strong>Advanced Custom Fields: </strong></a>This is the most popular plugin in WordPress. It has around 34 field-types, 4 of which are available in PRO version. If you need to use Gallery field, you need to use their PRO version.</li>



<li><strong><a href="https://wordpress.org/plugins/meta-box/" target="_blank" rel="noreferrer noopener">MetaBox</a>:</strong> It lets you customize custom fields with much flexibility. Their free version don&#8217;t allow you to create fields in WordPress admin. You have to use their online fields code generator. Then copy the code to your theme—a messy process. You can create unlimited custom meta boxes and fields with it.</li>



<li><a href="https://wordpress.org/plugins/pods/" target="_blank" rel="noreferrer noopener"><strong>Pods:</strong></a> It lets you create not just Custom Fields, but also Custom Content Types. It has a lot but is complex.</li>



<li><a href="https://wordpress.org/plugins/bonzer-custom-fields/" target="_blank" rel="noreferrer noopener"><strong>Bonzer Custom Fields:</strong> </a>This is also a good plugin. It lets you create many types of custom fields quickly and assign at many locations. It’s great if you don’t need huge number of fields. It become messy when number of fields goes beyond certain limits. On positive side: It&#8217;s quick, light, and does the job. It offers 15 field types and has no PRO version.</li>
</ol>
<p>The post <a href="https://ecfwp.com/wordpress-custom-fields/what-are-custom-fields-in-wordpress/">What are Custom Fields in WordPress?</a> appeared first on <a href="https://ecfwp.com">Effortless Custom Fields</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ecfwp.com/wordpress-custom-fields/what-are-custom-fields-in-wordpress/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
