Get Custom Field Values
This plugin provides a powerful widget, shortcode (with shortcode builder tool), and template tags for easily retrieving and displaying custom field values for posts or pages. The power of custom fields gives this plugin the potential to be dozens of plugins all rolled into one. This plugin allows you to harness the power of custom fields/meta data. Use the “Get Custom Field” widget, the [custom_field] shortcode (which has a post editor sidebar widget to help you build the shortcode), or one of six template tags to retrieve and display custom fields. Find a custom field for the current post, a specified post, a recent post, or randomly. And for the custom field values found by the plugin, you may optionally specify text or HTML to appear before and after the results. If nothing is found, then nothing is display (unless you define text to appear when no results are found). If multiple results are found, only the first will be displayed unless you specify a string to be used to join the results together (such as “,”), in which case all will be returned. Visit the Examples section to see how this plugin can be cast in dozens of different ways. There are six template tags provided by this plugin. Here they are, with an explanation of when they are appropriate for use: c2c_get_custom() : Use this inside “the loop” to retrieve a custom field value for a post c2c_get_current_custom() : This is only available on the permalink post template (single.php) and page template (page.php). Can be used inside or outside “the loop”. Useful for using custom field to define text you want to include on a post or page’s header, footer, or sidebar. c2c_get_post_custom() : Useful when you know the ID of the post whose custom field value you want. c2c_get_random_custom() : Retrieve the value of a random instance of the specified custom field key, as long as the field is associated with a published posted, non-passworded post (you can modify a setting in the plugin file to search passworded posts as well). c2c_get_random_post_custom() : Retrieves the value of random custom field(s) from a post when you know the ID of the post you’re interested in. c2c_get_recent_custom() : Retrieves the most recent (according to the associated post’s publish date) value of the specified custom field. You can filter the custom field values that the plugin would display. Add filters for ‘the_meta‘ to filter custom field data (see the end of the code file for commented out samples you may wish to include). You can also add per-meta filters by hooking ‘the_meta_$sanitized_field‘. $sanitized_field is a clean version of the value of $field where everything but alphanumeric and underscore characters have been removed. So to filter the value of the “Related Posts” custom field, you would need to add a filter for ‘the_meta_RelatedPosts‘. Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage Developer Documentation Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the numerous template tags, hooks, and shortcode provided by the plugin. As an overview, these are the template tags provided the plugin: c2c_get_custom() : Template tag for use inside “the loop” and applies to the currently listed post. c2c_get_current_custom() : Template tag for use on permalink (aka single) page templates for posts and pages. c2c_get_post_custom() : Template tag for use when you know the ID of the post you’re interested in. c2c_get_random_custom() : Template tag for use to retrieve a random custom field value. c2c_get_random_post_custom() : Template tag for use to retrieve random custom field value(s) from a post when you know the ID of the post you’re interested in. c2c_get_recent_custom() : Template tag for use outside “the loop” and applies for custom fields regardless of post. These are the hooks provided by the plugin: c2c_get_custom_field_values_shortcode : Filter to customize the name of the plugin’s shortcode. c2c_get_custom_field_values_post_types : Filter to customize the post types that should support the shortcode builder metabox. get_custom_field_values/can_author_use_shortcodes : Filter to customize if post author can make use of the ‘custom_field’ shortcode. get_custom_field_values/show_metabox : Filter to customize if the shortcode builder metabox is shown. The shortcode provided is [custom-field], which has a number of attributes to customize its behavior and output.
Top keywords
- custom37×4.86%
- field25×3.29%
- post24×3.15%
- custom field21×2.76%
- c2c14×1.84%
- template13×1.71%
- shortcode11×1.45%
- value9×1.18%
- filter8×1.05%
- random8×1.05%
- custom field values7×0.92%
- field values7×0.92%
Product Input Fields for WooCommerce
WooCommerce product pages don’t always collect the information customers need before placing an order. If you sell personalized, made-to-order, engraved, printed, or customizable products, customers often need to provide names, messages, measurements, dates, colors, or upload reference files. Product Input Fields for WooCommerce lets you add custom input fields to your WooCommerce product pages, making it easy to collect these details before customers add products to their cart. Whether you need a text field for engraving instructions, a file upload for artwork, a date picker for scheduling, or a dropdown with predefined options, the plugin helps you gather the right information during checkout. You can add one input field that applies across your entire store and one product-specific input field for individual products. Customize field labels, placeholders, default values, display position, and validation settings to match your store’s requirements. Key Features Choose from 19 Different Field Types Add custom fields to gather additional information from customers before they purchase. The plugin includes 19 field types, including Text, Textarea, Number, Checkbox, Radio Buttons, Select, File Upload, Date Picker, Time Picker, Week Picker, Color Picker, Email, Phone, URL, Password, Country, Search, and Range. Add Custom Fields to WooCommerce Products Collect additional information from customers before they purchase. Add custom input fields globally across your store or assign them to individual products, depending on your requirements. Customize Product Fields to Match Your Store Configure field titles, placeholders, default values, display position, priority, and custom CSS classes so your input fields match the design of your WooCommerce store. Make Customer Input Mandatory Mark fields as required to ensure customers provide essential details before adding products to their cart. You can also customize the validation message shown when a required field is left empty. Keep Customer Customization Details with Every Order Customer information collected through product input fields is saved with the WooCommerce order, making it easy to review customization requests during order processing. Uploaded files can also be attached to order emails for quick access. Common Use Cases Product Input Fields for WooCommerce is ideal for stores selling: * Personalized gifts * Engraved jewellery and accessories * Printed T-shirts and promotional products * Custom cakes and bakery items * Business cards and printed stationery * Photo printing services * Made-to-order furniture * Signage and printing products * Products that require customer notes or special instructions Documentation & Support Visit the WordPress support forums Check the documentation for common answers Try the live demo to see how the plugin works on the storefront. If you find the plugin useful, a ⭐ 5-star rating is always appreciated — it helps other store owners discover the plugin. Looking for More Advanced Features? Upgrade to Product Input Fields for WooCommerce Pro to create unlimited global and product-level input fields, apply conditional display rules, show fields based on products or categories, add quantity-based conditions, and unlock additional customization options. See the complete Lite vs Pro comparison: https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-product-input-fields-for-woocommerce-plugin/ About Tyche Softwares Tyche Softwares has been building WooCommerce plugins since 2009, helping merchants improve their stores with solutions for product customization, pricing, checkout, delivery scheduling, bookings, and order management. Explore More WooCommerce Plugins Tyche Softwares also develops plugins for abandoned cart recovery, order delivery scheduling, bookings, BOGO offers, invoices and packing slips, custom order numbers, order statuses, payment gateway fees, call for price, currency management, and other WooCommerce store enhancements. Some of our Pro plugins: Flexi BOGO for WooCommerce Abandoned Cart Pro for WooCommerce Booking & Appointment Plugin for WooCommerce Order Delivery Date Pro for WooCommerce Product Delivery Date Pro for WooCommerce Deposits For WooCommerce Payment Gateway Based Fees and Discounts for WooCommerce – Pro Custom Order Status for WooCommerce – Pro Custom Order Numbers for WooCommerce – Pro Call for Price for WooCommerce – Pro Price based on User Role for WooCommerce – Pro Currency per Product for WooCommerce – Pro Some of our other free plugins: Abandoned Cart for WooCommerce Order Delivery Date for WooCommerce – Lite Product Delivery Date for WooCommerce – Lite Payment Gateway Based Fees and Discounts for WooCommerce Custom Order Status for WooCommerce Custom Order Numbers for WooCommerce Call for Price for WooCommerce Price based on User Role for WooCommerce Currency per Product for WooCommerce External Services This plugin communicates with our tracking server to send usage data only if the user has explicitly opted in to usage tracking. For detailed information about what is tracked, please refer to our usage tracking documentation.