How about using a ternary operator?
if ($immopress_property['assistedLiving']): ?>
<li class="assistedLiving">
<span class="attribute" style="width:200px;display:block;float:left;"><?php echo 'Seniorengerechtes Wohnen' ; ?><span class="wpp_colon">:</span></span>
<span class="value"><?php echo get_post_meta($post->ID, 'assistedLiving' , true) ? 'Ja' : 'Nein'; ?> </span>
</li>
<?php wp_reset_query(); ?>
<?php endif; ?>
Also, please, keep your presentation separate from your content by not using inline styles.
Related Posts:
- Shortcode empty attribute
- Using wp_editor in shortcode
- Why are you using add_action for shortcode?
- How to get URL param to shortcode?
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- Native “playlist” shortcode random playing… How?
- How to display the names of users from a specific group with a shortcode?
- shortcode for logo image
- Stop strip_shortcodes() stripping content inside shortcodes
- Using audio shortcode for .mp3 URLs with a query string
- Get multiple shortcode attribute values
- How do i link gallery thumbnails to different url’s using the wp native gallery?
- How to display some selected user meta data on a specific page with a shortcode?
- Gallery shortcode menu order fix no longer working on WordPress 4.0
- How to save a shortcode in a Gutenberg custom block?
- Is shortcode_unautop() broken?
- has_shortcode for content added after the content
- Shortcode displays only default attribute values
- Can a shortcode function this way
- Dynamically create shortcodes using add_shortcode and a callback
- Creating a Slider Shortcode Based on Nivo Slider
- Passing attributes to shortcode dynamically
- Stop parsing shortcodes
- Meta tags in shortcode
- Adding PHP/HTML code inside page from custom template
- Why isn’t this youtube shortcode working?
- Gist shortcode is not working
- How to set Contact Form 7 fields default value using shortcode attribute? [closed]
- Display post metadata: “title, category, author, date” with shortcode
- shortcode javascript not working on custom template file inside theme folder
- shortcode get thumbnail size
- Shortcodes Keep Wrapping in
- Check if post has gallery images/media
- Stop auto formatting in shortcodes
- Get URL Param Plugin and Inserting Result in Widget Code
- Problem with using custom shortcode with ACF WYSIWYG field
- Add shortcode support to custom field
- Preserve shortcode content formatting
- Shortcode help: If no image entered take default
- How can I escape a section of my page which contains multiple shortcodes?
- Populate shortcodes with table data and get next row
- Running shortcode with variable that is modified
- Reloading a Mediaelement audio player
- Shortcode is not processed when added to option field using wp_editor
- How to apply an ID to Shortcode Embedded iframe
- Adding Shortcode Values to wp_head
- How to change the output of gallery shortcode
- Shortcodes: closing shortcode not being processed
- Retrieving post excerpt as a shortcode
- Insert PHP code via shortcode?
- Trying to call dynamic content as a shortcode attribute
- What is the correct syntax to append a URL using a shortcode for an iframe?
- Shortcodes in RSS excerpts
- How to trace shortcode to its functionality
- If else with shortcodes
- Using shortcodes to communicate my page design
- enqueue script with get_shortcode_regex
- How to set a variable in a shortcode and reference it in another shortcode in the same post?
- How to get_post_meta in a shortcode in excerpt on archive pages
- WordPress upgrade adding additional quote marks to shortcode output
- How to build a shortcode for tabs
- Creating tabs shortcode
- SImple Example To Update User Info From Front End [duplicate]
- Insert First Image into post (full-width)
- How can i strip shortcode from HTML title tag?
- Show content if user left comment / non-logged visitors?
- How to insert current user ID/entry ID into a shortcode?
- Need help with creating a simple shortcode
- Using a WP shortcode in Homepage
- i want to show a modal when user lands on home page very first time
- Gutenberg running code only available in front end within shortcode
- Insert HTML in content property and render it using shortcodes
- Redirect per shortcode if user is logged in
- create shortcode that changes url endpoint
- Logout user if click on a custom page link
- Shortcode Attribute not defined
- Attributes are not passed on nested shortcode
- Second attribute of shortcode is not changing why?
- Removing text + shortcode from all posts
- Is Post-Author-Id shortocde
- Load next post by ID on a single page
- Plugin Shortcode value in post
- Add catagory attribute to custom shortcode
- Woocommerce Filter Main Loop by Tag [closed]
- Shortcodes: override a shortcode / change shortcode on the fly
- Access the resized images generated by `add_image_size()`
- Class variables in shortcodes
- Separating Custom Template logic
- Defining the output of a WordPress Att
- Remove width and height attributes from [gallery] output
- Custom WP theme not showing shortcodes
- Shortcode for sectors
- How to not show shortcode contents if cart is empty?
- woocommerce Product shortcode create [closed]
- Help with Shortcode Functionality
- Shortcode Site include in a other
- Shortcode with foreach
- How do write this type shortcode? [closed]
- WordPress functions.php shortcode is not working [closed]
- My first WordPress shortcode just returning []