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%
Moonstack Ultimate Elementor Kit
Moonstack Ultimate Elementor Kit is a powerful plugin that extends Elementor Page Builder with a comprehensive set of professional widgets for displaying posts, custom fields, sliders, and various content elements. In the WordPress admin dashboard, the plugin settings and tools are available under the MU Elementor Kit menu. Features Post Display Widgets – Show post titles, content, excerpts, featured images, and meta data Advanced Sliders – Banner slider, card slider, and logo slider with multiple effects Custom Fields Display – Display ACF and custom post meta fields with various formats Interactive Buttons – Custom buttons with icons, animations, and advanced linking Fully Customizable – Extensive styling options and hook system for developers Widgets Included Post Widgets Post Title – Display post titles with word limit and linking options Post Content – Show full content or excerpts with formatting control Post Excerpt – Custom excerpt display with fallback options Post Meta – Display post metadata (date, author, categories, tags) Post Featured Image – Featured image display with linking and effects Post Custom Fields – Show custom fields and ACF fields with various formats Slider Widgets Banner Slider – Full-width banner slider with content overlays Card Slider – Card-based slider for posts, products, or custom content Logo Slider – Customer logo slider with hover effects and linking Form Widgets Form – Advanced form builder with AJAX submission, email notifications, and Google reCAPTCHA (v2/v3) integration External Services This plugin supports embedding videos from third-party video platforms such as YouTube, Vimeo, and Dailymotion. These services are used only when the site administrator explicitly selects a video field type and provides a corresponding video URL. When embedding a video: – The video ID is used to generate an iframe embed URL. – No personal user data is collected or stored by the plugin. – No data is transmitted automatically without user action. External services used: Dailymotion Service: Video embedding Website: https://www.dailymotion.com Privacy Policy: https://www.dailymotion.com/legal/privacy Terms of Service: https://www.dailymotion.com/legal/terms Vimeo Service: Video embedding Website: https://vimeo.com Privacy Policy: https://vimeo.com/privacy Terms of Service: https://vimeo.com/terms YouTube Service: Video embedding Website: https://www.youtube.com Privacy Policy: https://policies.google.com/privacy Terms of Service: https://www.youtube.com/t/terms Google reCAPTCHA Service: Spam protection and security Website: https://www.google.com/recaptcha/about/ Privacy Policy: https://policies.google.com/privacy Terms of Service: https://policies.google.com/terms Basic Widgets Custom Button – Advanced buttons with icons, animations, and links Developer Friendly All widgets include extensive hook systems for customization: moonulel_after_post_title_single_render moonulel_post_content_single_before_html_output moonulel_post_excerpt_single_before_render moonulel_before_post_meta_single_render moonulel_post_featured_image_single_before_render moonulel_post_custom_field_single_before_field_output moonulel_post_button_content moonulel_banner_slider_slide_background moonulel_card_slider_slides moonulel_logo_slider_logos moonulel_form_submitted_data moonulel_form_before_send_emails moonulel_form_after_save_db Customization All widgets can be customized using WordPress hooks. Example: // Modify post title output add_filter('moonulel_post_title_single_before_output', function($title, $post, $settings) { return strtoupper($title); }, 10, 3); // Add custom content after banner slider add_action('moonulel_banner_slider_after_container', function($settings, $unique_id, $widget) { echo ' Custom Nav '; }, 10, 3); // Filter form widget submitted data before sending email or saving add_filter('moonulel_form_submitted_data', function($submitted_data, $form_id, $post_id, $settings) { // Add custom hidden data $submitted_data['Source'] = 'Facebook Ads'; return $submitted_data; }, 10, 4);