Function get_term_by
returns object or array (based on $output
arg) on success and false if failed. But you treat it as string and try to concatenate it. So your code should be following:
$cat = get_term_by('id', 17, 'project_cats');
$html_content .= "<h3>" . rgpost('input_1') . "</h3>"; //Title
$html_content .= "<p><strong>Category:</strong> " . rgpost('input_5') . " | <strong>Budget:</strong> " . rgpost('input_3') . "</p>"; //Category & Budget
$html_content .= "<p>" . rgpost('input_4') . "</p>"; //Description
$html_content .= $cat->name;
Read more about this function in codex.
Related Posts:
- How to find objects by terms
- Display certain amount of posts on taxonomy archive page
- How do I get taxonomy terms by ID in a specific order
- Get taxonomy terms only of the WP_Query current posts
- get_term_link() returns correct – But illogical error-messages disturb
- PHP Warning: Attempt to read property “term_id” on bool
- Get term siblings of current child taxonomy
- How to get post’s current parent term ID?
- List taxonomy term slugs within shortcode (do_shortcode)
- Copy taxonomy terms from one post to another programmatically
- Hide image if taxonomy term is empty
- Isotope Drop Down Categories Filter Function
- How to filter custom taxonomy term name, slug, and description?
- Hierarchical taxonomy list with modificated term links
- Exclude product attributes from taxonomy terms loop
- How do I edit the terms output args or array data?
- update_term_meta() only updating once on certain meta keys
- New term taxonomy and description in front page. Input’s
- How to display terms from two taxonomies in one php code?
- Get all the contents of taxonomy and sort by term
- ISOTOPE – Missing/Invalid Arguement Get Terms
- WordPress taxonomy and terms question
- Should I use spl_autoload_register() in my plugin?
- WP-CLI – Selecting PHP version
- When to use Exceptions vs Error Objects vs just plain false/null
- Hide php Notices in Dashboard
- Upgrading PHP version results in “Use of undefined constant WP_CONTENT_DIR” warning?
- wp_set_object_terms and arrays
- WordPress custom taxonomy description for each post?
- get_terms return errors
- Get used terms by an author as array of strings
- List all categories but exclude current post category on single post page
- Fatal error: Call to undefined function wpsc_cart_item_count()
- Error when requesting password reset email – wp authentication
- PHP Customization: Taxonomies and Queries, why? [closed]
- Append a term to WooCommerce product existing product category terms
- After upgrading to PHP 7.0 my contact form outputs error
- Make first letter of my taxonomy uppercase
- How to change / delete product short description in Woocommerce
- Change description on specific WooCommerce product status change
- Taxonomy linked to pages
- How to find error in my code when the error message is pointing to WP core file?
- Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?
- Add meta noindex to post if it has a specific taxonomy
- Mute Debug Messages from Plugins
- Error on wp_default_style After upgrade to php 7
- Displaying Hierarchical custom taxonomy
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- Error: options page not found
- Which is the correct way to conditionally enqueue a CSS file?
- “Undefined index” error when saving empty array with checkboxes
- Limit Taxonomy Output in Conditional Statement
- Get all categories post is not in
- How can I display a div ONLY if it is not a certain term page
- customize wordpress database error page
- After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- Create a a form for custom taxonomy terms
- Taxonomy term count
- How to get all the items of a taxonomy even if it does not have a custom post type?
- Help with accessing wp-admin page and resolving error messages
- Blog suddenly shows Archive instead of index page
- Programmatically revert to backup .htaccess a possibility?
- Prevent post from being published and show error
- WordPress Conditional / Multiple Taxonomy Query
- Illegal string offset in PHP function in via Theme Customizer
- Show related products by attribute based and certain conditions
- How to hide a child category and show his parent category
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- I am having errors with checkout on wordpress
- How to retrieve taxonomy Metabox fields in frontend
- Intermittent 503 Service Unavailable Error
- ACF – Can’t get custom post type by taxonomy
- Trying to get property ‘ID’ and ‘post_author’ of non-object error
- Create category after theme setup and modify the default one
- PHP error on local server install
- Editing the term_order field
- Permalink like example.com/taxonomy/post_type/postname
- PHP Error in WordPress Theme
- WordPress database error only while loading page for 1st time
- Displaying child taxonomy before parent
- WordPress 3.0 PHP Error – notice WordPress_product_Type was called incorrectly
- How to associate dynamic PHP page for chosen WordPress tag?
- How to hide the Duplicate taxonomy values in WordPress?
- WordPress using get_term to retreive slug not working as expected
- How to get the count for each taxonomy term
- How to get all the terms of a post
- wordpress taxonomy in regular posts
- Incomplete term slugs output from a foreach loop with get_the_terms
- Troubleshooting “loopback requests that take too long”
- What does that mean: cannot use a scalar value as an array [closed]
- problem with php function error
- Please help! Parse error: syntax error, unexpected ‘
- PHP warning $post->ID is null
- Execute multiple PHP Snippets causes error?
- WordPress different custom tag being displayed in on tag list
- Use of undefined constant issue
- Three different queries on same page
- Remove colon from CTP UI “Singular Label”
- WordPress 6.1.1 shows deprecated errors with PHP 8.1 & 8.2