The reason your custom fields are only showing up when there is post content is due to this line:
<?php if( get_the_content() ):?><h3>
Everything after that line will only appear if get_the_content() returns something truthy. The reason being that you’re using a shorthand if statement and not closing to before the custom field logic Try this:
>
<?php if( get_the_content() ):?><h3>
<?php
//this closes the if statment
endif;
?>
<?php
echo types_render_field("nome-do-aeroporto", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));
?>
<br/>
<?php
echo types_render_field("cidade", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));
?>
I am wondering why your using that if statement in the first place however.
Hope this helps
Related Posts:
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Widgets not showing in my custom theme
- Customizer: Output default value in Customizer CSS
- Customizer: active_callback and sanitize_callback incompatibility?
- Saving and Restoring a Canvas on A Individual User Basis
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- Display movies that apear this day next
- How can I add diffrent editable text fields?
- Trying to update Woocommerce meta values
- Inserting a class on before_widget if checkbox is checked
- Where can I find the code for the menu page meta boxes?
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- fetch from an external api call and display results in page
- Multiple choice in a custom taxonomy
- Can’t load WP function into external function
- Displaying theme options in css
- Custom field value not saving when it contains a URL?
- Creating bulk posts with Youtube videos
- Sum custom field values of particular taxonomy
- Random Default Avatar Function
- Set WordPress Default Template
- Hide wordpress field if data is empty in post!
- Importing hard coded custom field into acf field
- Change the site tagline (or similar) based on current page
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Custom Theme, Custom shortcode not working
- Setting custom canonical urls
- tracking number field in Woocommerce order [closed]
- Only show search results with if current date is between two dates?
- database interactions using OOP
- How to add just one specific page to widget without plugin?
- Remove one value in dismissed_wp_pointers?
- WordPress does not load page.php, return 404.php
- create a select input with menus created on a custom options page
- Taxonomy linked to pages
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- How can I create a list of page titles from custom meta values?
- Accessing data from a non-WP database/table within a page content
- Passing the custom field values in the wp_get_current_user array function
- Adding custom directory and PHP files in wordpress
- WordPress blog post url on category page
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Changing layout with wp_customise
- WP dynamic featured image – Can’t get second featured image url
- Converting HTML Template to WordPress Theme
- Extending the WP_Widget_Text class
- Sort posts by custom fields value using dropdown menu
- Show full posts in archive
- WordPress add post format support not working
- Custom profile field with birthday. Troubles with
- Selectbox in admin panel function linking to CSS
- WordPress: Access a plugin from within a theme
- Can I install/embed WordPress on a ‘single page’?
- WordPress – Display array data of a child
- Custom options below pages/posts editor?
- Getting error when trying to implement site-wide breadcrumbs in Twentytwentyone Theme [closed]
- Connect WordPress with SharePoint [closed]
- wordpress allow user to edit user profile with custom fields
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- How to check if a meta value has already been assigned to any user?
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- Reconfiguring WordPress site
- adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- Move category description below post list in blog
- Trying to build simple deposit code that hooks into woocommerce
- Need Help Fixing My Iframes [closed]
- How to pick the default selected value in wordpress dropdown?
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- Firing schema via code in functions.php doesn’t work
- Add New User, extra fields which are required?
- user_profile_update_errors hook not executing
- Adding number to date not working [closed]
- Send an email to specific adress when button is clicked?
- How can I add extra word in permalink when someone click download button?
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- WordPress admin pointers tour bug?
- Seach custom post type posts only by meta fields?
- My page.php shows the index.php
- custom url rewrite for wordpress
- Extend plugin Class through functions.php
- How to use thumbnail size of image if I’m only using src to get image
- 3 Slashes appear after Apostrophe in custom fields after updating product-site
- How to add a do_action on refreshing of WP customizer?
- how to retrieve a value if a checkbox is checked
- Customize position of social icons in upme plugin [closed]
- Weird 404 URL Problem – domain name being placed at end of urls
- Trouble checking if custom woocommerce checkout field is empty or not
- Two queries for a WP_User_Query search work perfectly apart, but not together
- How to get the value of input hidden html from text editor to custom page template?
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Menu jumping when calling it via PHP
- Output Video Download Link in template
- Modify custom field input data before creating a new post