I would store the meta value in a variable, and use an if/elseif statement to determine what should be displayed, like so:
$registrazione_singolaono = get_post_meta( $post->ID, 'registrazione_singolaono', true );
$registrazione_multipla = get_post_meta( $post->ID, 'registrazione_multipla', true );
if ( 'singolo_file' == $registrazione_singolaono && ! empty( $registrazione_multipla ) ) {
echo $registrazione_multipla;
} elseif ( 'piu_file' == $registrazione_multipla ) {
// something else
}
Related Posts:
- Display a query with multiple post types and same relationship on a single page
- WordPress Custom Post Types with a page as a parent?
- Limit Authors to their Own Posts on front-end excluding admins
- How to redirect all pages of a custom post type [duplicate]
- Show ACF field from custom taxonomy and display on the single template
- Display children and grandchildren of a custom post type
- is_page_template not working as expected
- Conditional to modify query results
- Loading all files within a directory
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Get rewrite slug of custom post type in template
- Get Post Primary Category
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- How to make sure content doesn’t display if selection is empty
- How to customize a permalink (URL) structure?
- Can I list a custom post type within another custom post type in the admin area?
- I would like to have different styles for my posts based on the content of each post
- Set URL link to featured image of custom post type
- Redirect 404 page with ID in slug to associated page with same ID in slug
- How do I add a custom screen for a custom post type to be called from custom post row action?
- How to display custom WP menus?
- Problems wp_insert_post and save_posts filter
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- Cant get paginations on single.php to work with my custom post types
- How can I group posts by months and years?
- Trying to Create a PHP Variable for post_type that can be referenced Site Wide
- WP_Query Custom Post Type if Category ID Equals
- Not sure why this template for custom post type posts isn’t displaying anything. What’s missing?
- Control content before and after custom post type loop
- How to use a variable as a function name?
- Saving fields in a drop-down in WordPress
- WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”
- Different options per post type in WP_Query
- How do I create a new post upon registration with the users first and last name as title
- Query entries from custom post type in an ACF flexible content field
- Creating a non-hierarchical Taxonomy that behaves like categories
- Shortcode is displaying the content on top of the page [duplicate]
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- How to set the mainpage of a custom post type?
- custom post type by author – wp job manager
- Using Wp_Query, Json to add Highcharts series data
- Template code to split a post and print a custom field?
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Let users upload image(s) to the post from front end
- Using page title as a link to term archive
- How to display custom post type only on a certain page?
- Setup page template array in a custom post type
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- WordPress sitemap with Custom Post Types
- How can I sort the order of multiple custom field values in a custom post type?
- How do I ensure that post_type and Taxonomy use the same slug?
- pagination for custom post type archive page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Display All Courses in Course Archive Page
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- Is it possible to get the specific content on the search page?
- php dynamic content inside shortcode
- I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics
- Get all post under custom post type grouped by custom filed value in custom taxonomy
- I’m trying to create an if statement that will only display my button link for tickets if its under ‘admission-event’… what is wrong with my code?
- Set a template on a custom post in the plugin
- Persist meta box choices throughout all posts of same post type
- Do not show child pages within a file page
- Taxonomy doesn’t follow slug permalink structure
- Looping to organize and display custom posts by category using PHP and WordPress
- Search result based on URL
- Custom search for a custom post type in WordPress
- How to mix 2 kinds of post types
- CPT: execute code after load if parameter is set
- ACF Post Content Not Being Searched
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- Show custom taxonomy not in submenu
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Loop carousel slider in wordpress
- How to Fix WordPress 500 Internal server error due to custom post type
- Custom Post save causes 500 error
- Custom post tag images not displaying with ACF
- Function not pulling image or text from custom post type
- Exclude Custom Post Type from shared Custom Taxonomy
- WordPress Custom Post Type and sort by Tags
- Looping taxonomy in taxonomy?
- Permalink of Custom Post Type
- posting twice from an array?
- Pagination not working on homepage
- Query Custom Post Type by Tag
- Order custom post type is beign ignored
- How do I filter a custom post type loop by a field?
- How to manage wordpress knowledge base/wiki/posts collections
- How to string lines from the_content() hook in WordPress?
- Get custom post fields and display them
- PHP Button Custom link [closed]
- Getting ACF relationship field information
- How to dynamically register custom post type
- How to I add count of custom posts listed in a post as a prefix to its title
- Send email on creation of custom post type and use get_post_meta()
- add_rewrite_rule not working with custom post type
- Just the First Metabox what saves the data!