Okay. I figured out how to do this. I assigned a variable to use the value of the custom meta field, which just made things a little easier to visualise (for me):
<?php
$intro_para_value = get_post_meta(get_the_ID(), 'intro-para', true );
if ( has_post_thumbnail() ) { print get_the_post_thumbnail(get_the_ID(), 'homefeature_thumb'); }
elseif ( !empty ($intro_para_value)) { echo $intro_para_value; }
else { echo get_limited_excerpt('', '', 230); }
?>
Hope this helps others who might be stuck.
Related Posts:
- What is the correct way to use WordPress functions outside WordPress files?
- How can I save a multiple select array with the settings API for a plug-in options page?
- WP-CLI – Selecting PHP version
- Inject post (from specific category) between posts in Loop
- Hide php Notices in Dashboard
- Place page title in header?
- Shortcode to insert
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- WordPress new user / forgot password emails are broken
- How to get year, month and hour in WordPress?
- Calling a method from functions.php on a click of a button
- Specified file failed upload test. wp_upload_handle
- Want to separate sections of posts. Can you restart loop?
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- How do I create comment-reply-button using element not
- Two posts in same div – WP loop
- Compare two meta key values against each other inside the get_posts array?
- Removing WordPress profile fields from non-admins
- WordPress menu deletes when trying to add a hook
- Issue with foreach on duplicate meta_key’s
- Why am I getting ERR_NAME_NOT_RESOLVED when I add a site to my multisite installation? [closed]
- How to display custom field on homepage
- How to add custom taxonomy slug in CPT permalink?
- Show custom field if it exists, and show different elements if it doesn’t
- Making Quote Plugin more efficient
- Different database query in function.php using mysqli
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- Create shortcodes within foreach loop (using array)
- PHP Warning: Attempt to read property “term_id” on bool
- Fatal error: Uncaught Error: Call to undefined function test()
- Cannot access wp-admin/wp-login.php (WordPress backend) anymore, what could be wrong?
- Passing UTM Parameters To Modify Page In WordPress
- How can I get the values of my WordPress $wpdb query in Jquery?
- Adding function to Genesis genesis_header [closed]
- Echo string and function?
- Adding wrapper elements in the_date() like in the_title()?
- What is the latest WordPress that will work on PHP 5.2.17?
- Plugin Generate Unexpected output during activation
- Function returns post URLs rather than retrieving Facebook Graph API data
- Editing a PHP file to include a small text piece on every page
- PHP code for displaying WordPress posts in a static page not working
- WordPress hit memory limit but not from the server
- How to override url params with rewrite rules vars?
- Can’t successfully check if post with title exist in database
- How to render a block from php template
- Filter results from a serialized string to use on statistics
- How to add data to a custom field at the wp_users table?
- form built dynamically with php, not submitting
- Post to WordPress from another Server via PHP
- Why the dynamic_sidebar() call is putted into an ul tag?
- Accessing an API with jQuery and AJAX
- Timber right sidebar in WordPress theme
- Build A Custom SQL Query for WordPress Search
- Get main parent category for post (WordPress/Advanced Custom Fields)
- How to run complex query using PHP
- Store ajax data in PHP variable
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- Configure WordPress to Use Responsive Image Rendering
- Creating multiple tables with Plugin
- How to edit post meta data before publishing the post it self wordpress?
- How can i create a function tag in my plugin
- Why the responseText containing those two arrow signs at the beginning
- Call jQuery function from PHP?
- How to Get Linked Elements for a specific ml_source_elementid
- Meta Box clears saved field content
- Woocommerce remove menu item on myaccount dashboard
- Adding action item to admin users table and sending email
- Metabox – Displaying the Value of a Metabox
- Using get_the_excerpt in edit-post
- woocommerce plugin bugs
- Getting most popular posts based on Facebook comments count
- WordPress get_post_meta issue
- Woocommerce Price Text
- Best way to define a database with product codes and back-end support?
- WordPress – custom navigation item classes
- Is there a way to randomize and connect a background and header image?
- Post Thumbnail on Single (if elseif else)
- Display pages from specific page template
- dynamically filter by category via sub-menu
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- Sidebar doesnt get updated?
- Edit the Publish Widget Options
- How can I print out a single stylesheet or javascript link?
- If the_content’s string length is greater than 0, show post otherwise dont
- WordPress post pagination on custom template not working
- get_option(‘admin_email’) not working in wordpress when using ajax call
- wordpress featured image
- How do I update product shipping using PHP in WooCommerce?
- How can I edit the WooCommerce Mini DropDown Cart to read as follows
- Why can’t I enter the wordpress admin interface?
- base64_encode conflict with convert_smilies in wordpress
- Disable Typed Parameters for JavaScript in PhpStorm? [closed]
- Too few arguments at registering new templates in my plugin
- inner-wrap div pushing custom table far down on page
- Remove Woocommerce product from cart with ajax/fetch
- Automatically change insurance quantity based on cart total [closed]
- I want to lists posts in wordpress to nearest location entered by the user
- How to edit a widget code?
- Hide ‘Downloadable’ and ‘Virtual’ checkbox options from Woocommerce Variations?
- footer doesn’t display