You will have to walk/map/filter the array before printing them. There’re plenty of array_*()
functions provided by PHP for that. Example:
$custom = get_post_custom();
// Remove all strings starting with `_`
array_filter( $custom, function( $data, $name ) {
return "_" !== substr( $name, 0, 1 );
}, ARRAY_FILTER_USE_BOTH );
foreach ( $custom as $field )
var_dump( $field );
Related Posts:
- Change the Labels of Users to Customers in Admin
- Where are Additional CSS files stored
- What Is The Use Of map_meta_cap Filter?
- How to use more than 256MB of memory in the admin?
- Localization: I want the backend: english and frontend in defined language
- How to get current_cat in navbar, in single post
- Need logged in users returing to site redirected to a separate page
- Widgets vs. Theme Mods
- When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?
- wordpress custom walker for thumbnails with custom menu
- Adding an email column to a Custom Post Types Admin Screen?
- Selecting An image from the Media LIbrary on the frontend
- WordPress audio player has two different styles
- Allow Users to Set Password During Registration
- Print shortcode in custom action hook not where the shortcode is entered
- WordPress 3.1 removing ‘category’ from the slug
- Why does WordPress 3.0.4 keep deleting the contents of the .htaccess file?
- Custom search page and search by title, content and tag
- Set user loggin status?
- Intercept invalid email during lost_password
- Only append custom classes to nav menu items
- redirect product-category to a custom page
- Hide upload image fields for the different media upload popups
- WP-Admin gives 403 Forbidden after login on CentOS 7
- Custom Taxonomy Archive not displaying entries
- Creating Search Engine Friendly URL’s with Word Press
- Add Div to Comment Form
- Extend Screen Options
- Any tools for quickly grabbing comments / comment count?
- Custom WP_Query with no posts to output
- How to add “Read More…” link in twentytwenty
- Adding Page Attributes and Page Templates to Custom Post Type WP 4.7.3
- How to remove the search fields in Twentytwelve
- syntax highlighting for theme-editor.php?
- adding homework to a school’s website
- Understrap child theme JS not working in custom-javascript.js file
- Adding code to child’s theme css and php cannot override certain elements
- Resizing of a header/div in a website through css in wordpress [closed]
- Prepopulating a specific page template with HTML/CSS
- Login/Logout Session Sharing – Multiple WordPress Installations
- Changing settings of WooCommerce
- How can I stop access of unregistered user in wp-content/uploads directory without using .htaccess file?
- Is there a way to by-pass the pagination function on one custom template?
- Where in code to replace content before display of page?
- Page content dissapears after loading the page [closed]
- Changes in my child theme from customizer not appearing in style.css?
- Change “empty trash” button text?
- wp_customize set_transient except during preview
- Custom SELECT Query With Multiple Meta Values (Ordering Problem)
- Change Successful password reset message
- White letters in header
- How do you add a table to a site?
- How I can directly add drop-down in my product on shop page as show in below image
- Is there a possiblity to replace profile image gravatar with custom user images
- WooCommerce custom billing fields on email address
- Is there a straight-forward way to provide a meta description tag via Yoast SEO, programmatically, without relying on the admin panel?
- How do I hide an article element so only logged out users see it
- Restrict content access to logged in users
- Replace a ‘Title’ tag with a Custom Field
- How to create a custom WordPress front page
- Custom Form not generating URL
- Is it possible to integrate a custom login feature with wordpress?
- User Custom Dashboard
- Exclude current post but keep the same posts-per_page amount
- WordPress Command Question
- getting a 404 page for all pages except home. possibly permalinks
- How do I create a Custom Post Box that Connects Different Posts Together
- Pull Latest Forum Posts within WordPress
- Add custom border across footer widget area
- Custom menu not showing even though it shows as being registered?
- Multisite with subdirectories, and a WordPress installation in a custom folder
- How to make conditional statement in WpBakery (formarly Visual Composer)
- Display all subterms of a custom taxonomy filtered by parent terms
- Widget recent comment filter by post meta_value
- Adding shortcode to product short description
- Display Custom Taxonomy Name As A Shortcode
- Latest update broke my custom login CSS
- Removing fields and buttons from admin dashboard?
- How to fix custom add menu page preventing media library from loading
- Unhook a function within a class in the child theme
- Disable post-new.php (default Post type)?
- How to serve an already coded html page in a WP page, to assign a simpler url
- Change the template of my Blog entries
- User WordPress menu in custom page
- Use another theme template in my theme
- Display popular posts by how many hits it got within 30 days of publishing
- How to use hook admin_init for add_action for custom post type column
- WP Customizer – what types of fields is it capable of supporting?
- How to make my wordpress site responds for 2 domains
- User registration add user ID?
- Can’t Auto-Update, but permissions are good?
- WordPress uploads directory. Featured Images storage
- How to answer, and we aren’t using WordPress to manage your site? [closed]
- WooCommerce customise checkout billing form [closed]
- Is there a way to have information on one page automatically feed into another? [closed]
- Upgrade to 3.1.1 Fails
- Disable all Fonts that are Standard in WordPress and replacing them with a custom Font?
- Custom product sorting archive page
- Add custom information in editor summary
- A Voting system for a pageants